Jump to content

Putting Javascript into a PHP file


drymetal

Recommended Posts

I have a question and I've even done a mythical dance around my cat in hopes that someone can help.

 

I am trying to add a popup menu to zencart.  I created the popup menu in a program called ScriptForest PopUp Menu. 

This program gave me a code to copy and to paste into the body of an HTML page.  That code is:

 

<

script language="javascript">var MenuFolderName="";</script><script charset="UTF-8" language="javascript" src="sftmp6arrays.js"></script><script charset="UTF-8" language="javascript" src="sfmenutmp6ie.js"></script>

 

It then gave me two files to put in the directory of the file that has that code in it.  These files are:

 

sftmp6arrays.js

sfmenutmp6ie.js

 

So, I added the two files to the jscript folder for my template because that is what I was told to do because zcart loads all javascript in there automatically into the browser.

 

So now here is the part that I've been beating my head against the wall with:

 

I need to insert some sort of call function I guess into the tpl_header.php file so that the menu appears.  I just have no way of knowing how to do this.  It frustrates me because I have added a tech support chat link and a flash banner into this file...but javascript?  Man...we might as well be talking about my girlfriend.  I have no idea what the heck is going on.

 

So do I just need a script that calls those two files, that is basically the javascript code (that was given to me to put in the body of an html file) but written for php?  Or do I need to have a call function of sorts that calls something or another...lol?

 

Please... any help would be fantastic.  This has been so frustrating for me and I can't make heads from tails with this.  Thanks.  :)

 

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.