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
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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.