Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Inserting Javascript Menu?

Aloittaja bdanielsson, huhtikuu 12, 2006, 01:58:27 IP

« edellinen - seuraava »

bdanielsson

Hi. I'm trying to match my wordpress site which has a Javascript Menu. I inserted the script in the header of the index.template.php just fine...... I just can't figure out how to put the div and menu list in the body. I get a template parse error.

I tried putting an echo' '; thing around it, but that didn't work. I have no idea how php works. Here's what I'm trying to insert into my template:
<div id="chromemenu">
<ul>
<li><a href="http://website.com/home.php">Home</a></li>
<li><a href="http://website.com" onMouseover="cssdropdown.dropit(this,event,'dropmenu4')">Features</a></li>
<li><a href="#" onMouseover="cssdropdown.dropit(this,event,'dropmenu2')">Artists</a></li>
<li><a href="http://website.com/forums/" onMouseover="cssdropdown.dropit(this,event,'dropmenu3')">Community</a></li>
<li><a href="http://website.com/events/">Events</a></li>
<li><a href="http://website.com/about/">About</a></li>
<li><a href="http://website.com/contact/">Contact</a></li>
<li><a href="http://website.com/links/">Links</a></li>
</ul>
</div>

<!--FEATURES drop down menu -->
<div id="dropmenu4" class="dropmenudiv" style="width: 125px;">
<a href="http://website.com/podcasts">Podcasts</a>
<a href="http://website.com/video">Videos</a>
<a href="http://website.com/interviews">Interviews</a>
<a href="http://website.com/reviews">Reviews</a>
<a href="http://website.com/columns">Columns</a>
</div>



I'm at a loss. Thanks in advance.

Elmacik

Open notepad and paste this code there. Press CTRL + H
To the first box, type a single quote ( ' ) and to the second box, type a backslash with a single quote ( \' ) then press "Replace All"
Not use that codes instead :)
Home of Elmacik

bdanielsson

Thanks for the reply. I'm don't quite understand what you're saying. Paste which code? The code I posted?

Also, I'm on a Mac... so I don't know what CTRL + H is supposed to do exactly.

Elmacik

Damn I thought you could be on a different system but I thought teaching to fish is better :P
Use these codes, not the ones above;

<div id="chromemenu">
<ul>
<li><a href="http://website.com/home.php">Home</a></li>
<li><a href="http://website.com" onMouseover="cssdropdown.dropit(this,event,\'dropmenu4\')">Features</a></li>
<li><a href="#" onMouseover="cssdropdown.dropit(this,event,\'dropmenu2\')">Artists</a></li>
<li><a href="http://website.com/forums/" onMouseover="cssdropdown.dropit(this,event,\'dropmenu3\')">Community</a></li>
<li><a href="http://website.com/events/">Events</a></li>
<li><a href="http://website.com/about/">About</a></li>
<li><a href="http://website.com/contact/">Contact</a></li>
<li><a href="http://website.com/links/">Links</a></li>
</ul>
</div>

<!--FEATURES drop down menu -->
<div id="dropmenu4" class="dropmenudiv" style="width: 125px;">
<a href="http://website.com/podcasts">Podcasts</a>
<a href="http://website.com/video">Videos</a>
<a href="http://website.com/interviews">Interviews</a>
<a href="http://website.com/reviews">Reviews</a>
<a href="http://website.com/columns">Columns</a>
</div>

Dont forget to echo ;)
Home of Elmacik

bdanielsson


Advertisement: