kbsimm Posted April 30, 2008 Share Posted April 30, 2008 I am new to php and have not the faintest idea of how to insert java script into my php file. When I insert it as it is, I refuses to work. This is the code: <SCRIPT type=text/javascript> //HV Menu- by Ger Versluis (http://www.burmees.nl/) //Submitted to Dynamic Drive (http://www.dynamicdrive.com) //Visit http://www.dynamicdrive.com for this script and more function Go(){return} </SCRIPT> <SCRIPT src="callforpapers_files/exmplmenu_var.js" type=text/javascript></SCRIPT> <SCRIPT src="callforpapers_files/menu_com.js" type=text/javascript></SCRIPT> <NOSCRIPT>Your browser does not support script</NOSCRIPT> If anyone can give guidance, I would appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/103546-inserting-javascript-in-php/ Share on other sites More sharing options...
RichardRotterdam Posted April 30, 2008 Share Posted April 30, 2008 javascript is clientside(unless is asp which can run server side) which means it runs in your browser php runs on the server. this means you cant insert javascript into php. you can create a workaround. describe your you can use php to generate javascript which might be the thing you are looking for. problem and maybe you might not need javascript at all or php. Quote Link to comment https://forums.phpfreaks.com/topic/103546-inserting-javascript-in-php/#findComment-530215 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.