Current location: Hot Scripts Forums » Programming Languages » PHP » In Need of your advice ? PHP-JScript


In Need of your advice ? PHP-JScript

Reply
  #1 (permalink)  
Old 11-19-04, 11: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-20-04, 08:26 AM
Acecool's Avatar
Acecool Acecool is offline
Aspiring Coder
 
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
for ($i = "0"; $i < 1000; $i++)
{
echo '<script>document.form1.text.value='.$i.' ;</script>';
}

Same thing :-)
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-20-04, 09:00 AM
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
i know , but i think the problem in these ways that the page appears as if it wasn't completed until the loops finish !
__________________
Email : write2shadi at gmail dot com
MSN : write2shadi at gmail dot com
Aim : shadiaim7
Skype: shadi_skype
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
PHP Advice andyX PHP 6 09-21-04 03:33 PM
php with Apache in windows eDevil PHP 3 08-08-04 01:03 AM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 01:31 AM
PHP search engine-need some advice darkcarnival Website Reviews 18 08-06-03 07:35 PM


All times are GMT -5. The time now is 06:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.