PDA

View Full Version : Dropdown HTML Control Adaptation (many parents, one child)



pinch
04-21-2008, 04:08 PM
1) Script Title: Dropdown HTML control Adaptation

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropdowncontrol.htm

3) Describe problem:

I am trying to adapt the 'Dropdown HTML control' to handle my particular application scenario. First of all I'm not sure I'm using the correct script for my circumstances so let me start there:

In my application I'm dynamically generating a bunch of clickable (parent) items. The 'Dropdown HTML control' script ties together 'parent' and 'child' items so that clicking on the parent will cause its associated child to pop-up next to it. If you mouse over from the parent to the child, the child will stay visible until you lose focus of it, then it will disappear.

All of this works fine if you have one 'child' for each 'parent' control. However, in my application, I want to pop-up the same child control for ANY parent control that is clicked (I want to include the child-control only once on the page, but have it appear next to any parent control which is clicked).

In my application the child appears correctly next to any parent that is clicked, but when I try to mouse over from the parent to the child (to access controls that I have nested inside of the child) the pop-up disappears. It works for the last parent on the page (assumedly because that is where the only real child resides since it is only included once) but on every preceding parent I cannot successfully mouse-over from the parent to the child without the child disappearing.

Any guidance on how to modify this script (or if another script would be appropriate) would be appreciated, thanks.

ddadmin
04-22-2008, 06:40 AM
If I understood you correctly, you wish to associate one drop down content to multiple activating links. If so, Drop Down Content script supports this. For example, the below two anchor links both will reveal the same drop down DIV:


<!--Anchor Element 1 -->
<b><a href="search.htm" id="searchlink" rel="subcontent">Search DD</a></b><br />


<!--Anchor Element 2 -->
<b><a href="new.htm" id="newlink" rel="subcontent">Search DD</a></b><br />

Both links above reference the drop down DIV with id="subcontent". Read the script page for the other details.

pinch
04-22-2008, 01:13 PM
Yes ddadmin that is exactly what I'm looking for. Are you talking about this script (http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm) in particular?

ddadmin
04-23-2008, 07:12 AM
Hi:
Yep. Sorry, forgot to include the link in my post above.