Jump to content

Inserting Javascript in php


kbsimm

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/103546-inserting-javascript-in-php/
Share on other sites

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.