Forum Moderators: open

Message Too Old, No Replies

JavaScript Pulling Value from PHP Script

         

wfernley

8:55 pm on Apr 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm sorry about all the posts haha...

I have a PHP script that grabs the number of rows of a table in my database. When you run the page it displays a number.

I want to have a text field in another page that refreshes every 5 seconds with the number of rows in the database. This would mean the JavaScript would have to look to that PHP script/file to grab the number.

Is it possible for JavaScript to look to a file to grab information on it and write it in a text input?

Thanks in advance for your help!

Wes

Little_G

9:09 pm on Apr 26, 2007 (gmt 0)

10+ Year Member



Hi,

You can use AJAX, take a look at the example here [developer.mozilla.org].

Andrew