PDA

View Full Version : Bullet List Menu Help



Fisher
04-21-2009, 07:49 PM
1) Script Title: Bullet List Accordion Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htm?expandable=2

3) I am wondering if someone might be able to help me out with a problem I am having with the Bullet List Menu. I am trying to get the expandable headers to open a link in a second frame on the site I am working on but have only been able to get it to open in its own frame.

I have the same js files and have set the revealtype to click. Here is the area of code I am working on which is inside the arrowlistmenu div:



<li><a class="expandable" href="title.html" target="mainFrame">Title Page</a>
<ul class="categoryitems" style="margin-left: 15px">
<li><a href="into.html" target="mainFrame">Introduction</a></li>
<li><a href="chapt1.html" target="mainFrame">Chapter 1</a></li>
</ul></li>

The only problem I am having is at the Title Page. Any help is greatly appreciated!

<")))><

Fisher
04-22-2009, 11:24 AM
I didn't mention this earlier but it might give a hint to what is going on.

I've also tried to use other targets on the link such as "_blank" which do not change the effect. All links will only open from here in the same windo and/or frame.

Thanks again.

ddadmin
04-22-2009, 05:35 PM
Well, there's the link inside each header, then there are the links inside the sub menu area being expanded/contracted:


<li><a class="expandable" href="title.html" target="mainFrame">Title Page</a>
<ul class="categoryitems" style="margin-left: 15px">
<li><a href="into.html" target="mainFrame">Introduction</a></li>
<li><a href="chapt1.html" target="mainFrame">Chapter 1</a></li>
</ul></li>

At a glance "Title Page" above would be the header link in your case. Are you trying to get both types of links to open in a specific frame? The script doesn't touch the links in the sub menu area at all, so specifying a target by itself should do the trick already. For the header link, it's a little different, but I'll wait for your response on what you're trying to do first.

Fisher
04-24-2009, 03:50 AM
Hey DD!

What you have described is exactly what I am trying to do. I want the header link to open in a specified frame as well as the sub menu area. We have a fix now using "onclick" and "window.open" (I think) but it is a little long and complicated. I do not have it with me at this moment but will try to get that line of code in here tomorrow.

Thanks for any additional help!

ddadmin
04-24-2009, 07:23 AM
I assume you're getting the header link to respond at all by setting the revealtype setting to "goto", correct? With that pre-requisite, inside the .js file, find the following lines:


setTimeout(function(){location=targetLink.href}, 200)

which by default just loads the target page in the same browser window. To alter it so the page is loaded in another frame, you can change the above to something like:


setTimeout(function(){window.frames['framename'].location=targetLink.href}, 200)

Where "framename" is the name of the frame you want to target.

Fixed an error in the sample code

Fisher
04-24-2009, 04:26 PM
Thanks! I will see if that makes things easier. I had it working with the reavealtype set to "click" and where I need it to load the frame I have added:


onClick="window.open('title.html', 'mainFrame')">

Thanks again for your assistance!

Keith