View Single Post
  #1 (permalink)  
Old 11-19-04, 10:23 PM
shadi's Avatar
shadi shadi is offline
Wannabe Coder
 
Join Date: Aug 2004
Location: EGY
Posts: 145
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb In Need of your advice ? PHP-JScript

i'm using a way to attach between javascript and php and i want to know if there is something better or not.

as example , if i want a text-box value to be changed from 1 to 1000 and display the result everytime

if i used PHP only i have to refresh the page 1000 time !

but i can make a while loop like this
Code:
while($n <= 1000)
{
echo '<script>document.form1.text.value='.$n.' ;</script>';
$n+1;
}
This simple code will make the text value changes from 1 to 1000 without refreshing the page. ...

so do you think this way is good ? or maybe you have other idea

thanks
__________________
Email : write2shadi at gmail dot com
MSN : write2shadi at gmail dot com
Aim : shadiaim7
Skype: shadi_skype
Reply With Quote