Digital Point Forums
Winn and Sims

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Nov 29th 2004, 3:12 am
utrosa utrosa is offline
Peon
 
Join Date: Nov 2004
Posts: 1
utrosa is on a distinguished road
javascript, php

I'm trying to refresh textboxes with values received from cgi scripts.

I use php code within javascript that calls cgi scripts. So textboxes are refreshed every second with values received from cgi script.

Example (javascript and php code set value in textbox received from cgi script):

document.getElementById("id11").value= <? echo system(/home/apache/cgi-bin/id11.cgi'); ?>;

But textboxes are always refreashed with values received from cgi scripts when they are called for the first time. If cgi script returns value 5 when it is called first time and written in textbox, then this value (5) will be written in textbox every next second. Correct value is written again in textbox when I refresh web page, but only when cgi is called for the first time. From there on the old value is written in textbox every next second again.

How to solve this problem?
Reply With Quote
  #2  
Old Jan 18th 2005, 1:29 am
phrozen_ra phrozen_ra is offline
Champion of the Naaru
 
Join Date: Jan 2005
Posts: 147
phrozen_ra is an unknown quantity at this point
make a function and call it with

Code:
setTimeout('myfunction()', 1000);
and

Code:
function myfunction()
{
   document.getElementById("id11").value= <? echo system(/home/apache/cgi-bin/id11.cgi'); ?>; 
}
it should work
__________________
Funny Quotations | Reading Glasses |
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Safe-Mode permissions, redux Owlcroft PHP 17 Nov 9th 2008 12:54 am
JavaScript vs. PHP links digitalpoint PHP 9 Jan 23rd 2008 1:47 am
javascript, php accessing form elements dave ner0tic JavaScript 4 Dec 12th 2005 11:38 am
Javascript or PHP World Clocks Coding? misohoni JavaScript 8 Sep 17th 2004 1:59 am
Help Needed on Converting specific javascript commands to php such as math.random() ProductivePC PHP 4 Jun 6th 2004 3:34 am


All times are GMT -8. The time now is 2:13 am.