Computer Science Canada Help on passing variables from php to javascript |
Author: | nonamedude [ Sat Apr 09, 2011 4:43 pm ] | ||||||
Post subject: | Help on passing variables from php to javascript | ||||||
Hey guys, I am trying to get a value from a php script and into my JavaScript function but nothing seems to be printing out. Right now i have
If i echo, it does echo the values of the variables, but then when i transfer it over.
I am trying to print out the results to a div which is in the same area as the javascript
And the function changevalandcolup, basically changes the color of the image, and then calls the function to change the value. Anyone know how i can do this :/ |
Author: | nonamedude [ Sat Apr 09, 2011 4:50 pm ] |
Post subject: | Re: Help on passing variables from php to javascript |
*bump* |
Author: | Amailer [ Sat Apr 09, 2011 4:54 pm ] |
Post subject: | RE:Help on passing variables from php to javascript |
http://api.jquery.com/jQuery.ajax/ jQuery will make your life much easier. |
Author: | nonamedude [ Sat Apr 09, 2011 5:33 pm ] |
Post subject: | Re: Help on passing variables from php to javascript |
Ty, i started using jquery, and its like a blessing from heaven lol |
Author: | nonamedude [ Sat Apr 09, 2011 7:11 pm ] |
Post subject: | Re: Help on passing variables from php to javascript |
Hey guys, I just wanna know, how do you use mysql with jquery, meaning, how do you print out something from a database. |
Author: | Amailer [ Sat Apr 09, 2011 7:41 pm ] |
Post subject: | RE:Help on passing variables from php to javascript |
Take a look at: http://www.electrictoolbox.com/json-data-jquery-php-mysql/ |