woolyg Posted April 21, 2008 Share Posted April 21, 2008 Hi all, Is it possible to run a javascript without an event handler? What I'd like to do is to update the contents of a text box, as information is parsed into a php file, on the fly. The info to go into the text box depends on values pulled from a mySQL table by the PHP file. An order of something like this: <?php //Mysql query grabs info from a table //Values are assigned to 2 variables //Text box 1 is updated with the value of variable 1, using javascript, automatically //Text box 2 is updated with the value of variable 2, using javascript, automatically //The world becomes a better place ?> Can this be done? Thanks, WoolyG Quote Link to comment https://forums.phpfreaks.com/topic/102191-running-a-javascript-as-part-of-a-php-page-parse/ Share on other sites More sharing options...
RichardRotterdam Posted April 24, 2008 Share Posted April 24, 2008 Why do you need javascript or are these the actions that have to be done when the page has already loaded? in that case it would be a ajax problem Quote Link to comment https://forums.phpfreaks.com/topic/102191-running-a-javascript-as-part-of-a-php-page-parse/#findComment-526335 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.