corillo181 Posted June 17, 2007 Share Posted June 17, 2007 sorry i know is should be asking anything related with javascript in the javascript section, but the guru of that topic don't be there and is just a quick question. is there any way that i can make a block of php code execute with java script? like <script type="text/javascript"> function testSelect(form) { var Item = form.year.selectedIndex; var Result = form.year.options[item].text; if(Result==d.getFullYear()){ php code here } } </script> Quote Link to comment Share on other sites More sharing options...
nogray Posted June 18, 2007 Share Posted June 18, 2007 PHP and JavaScript can't see each other. so, the "php code here" should be the output of the php. You can use ajax to call a php page and get the response. Quote Link to comment 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.