Forum Moderators: open

Message Too Old, No Replies

creating menu from link

complicated ... I think

         

Mysc

12:49 pm on Jun 14, 2005 (gmt 0)



Okay here is what I want, but I really don't know if it's even possible.

Page contains no frames, just one main iframe, that contains the contents.

I have a main menu on the left side, and I would like for it to create a submenu on the right (various with every click on the main menu).
Normally i would use frames (and say onclick blabla to open two things at the same time), but I'm really done with the frames, so no more of that.

So how to do it? Can I create an iframe on click with the menu? Or maybe a table? And at the same time change the contents of the iframe in the middle?

Hope that anyone can help me, or else it's back to a static iframe on the right.

Thanks in advance!
June

dlefree

10:35 pm on Jun 18, 2005 (gmt 0)

10+ Year Member



Using the document.getElementById('elementname') feature might work out well for you...

Example:

-- Head --
-- Script --

function showElement(elementName) {
document.getElementById(elementName).style.display="block";
}

-- /Script
-- /Head --

-- Body --

<div id="menu" style="display:none;">
(Menu contents)
</div>

<a onClick="javascript:showElement('menu');">Link Text</a>

-- /Body --

(And, of course, you can set the display value back to "none" with another function or however you like). Let me know if this works for you!