![]() |
|
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
make a function and call it with
Code:
setTimeout('myfunction()', 1000);
Code:
function myfunction()
{
document.getElementById("id11").value= <? echo system(/home/apache/cgi-bin/id11.cgi'); ?>;
}
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
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 |