News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Adding Javascript menu to header

Started by Cougra, December 17, 2005, 11:53:00 AM

Previous topic - Next topic

Cougra

Hello, I've just converted my phpbb forum to the SMF forum and am attempting to customize the header to match the headers on the rest of my site.  I am not familiar with adding script in PHP pages, only HTML so I'm having problems adding the site menus.

I have the basic HTML table showing however when I attempt to add the javascript dropdown menu in what should be the "header" part of a HTML page I run into major problems.  I have it set up so that the header calls a .js file with all the javascript code in that looks like this:

<SCRIPT LANGUAGE="JavaScript" TYPE="TEXT/JAVASCRIPT"
SRC="http://www.mywebsite.com/menu/menu1.js">
<!--/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//-->
</SCRIPT>

When I have only this code in place but nothing that actually uses the javascript file I don't get any template errors. 

When I add something that calls the javascript file that looks like this:
<a href="../../index.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '105px')" onMouseout="delayhidemenu()" style="text-decoration: none">
I get the following error in the forum
QuoteTemplate Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------

parse error, unexpected T_LNUMBER, expecting ',' or ';'

I suspect that the error actually comes from whne the .php file tries to process the .js file but I don't know who to fix that. 

I would really appreciate any help that I can get.  If you need to know the contents of the javascript file please ask and I'll be happy to provide that for you as well, although it is a long file!

Thanks for your time.

PS.  I'm new here and not sure if there are any rules for leaving links to my site so I have omitted any such links from the code. 

Sheepy

Try replacing all double quotes with single quotes.  Double quotes are often used to start/end a string, and having it in the string will cause said error.

Advertisement: