SilverFox1405241541 0 Report post Posted May 26, 2007 I need help on how to have a mysql value as a JS var.please post any hints/tips/how to do it. I had been doing it where the JS var = php var for the db data. That's not working it seems.Cheers,Silverfox Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted May 27, 2007 I need help on how to have a mysql value as a JS var.please post any hints/tips/how to do it. I had been doing it where the JS var = php var for the db data. That's not working it seems.Cheers,SilverfoxWell, when i need this kind of functionallity what i do is:<script type="text/javascript">var Js_StringVar ="<?php echo $php_StringVar; ?>";var Js_NumVar =<?php echo $php_NumVar; ?>;</script>I don't post any code for date/time vars because until now i don't need it in my code, but i think that it will be something similar.Best regards, Share this post Link to post Share on other sites
SilverFox1405241541 0 Report post Posted May 27, 2007 (edited) Well I finished it as of this edit. I'll post a tutorial later. Edited May 30, 2007 by SilverFox (see edit history) Share this post Link to post Share on other sites