Coding Help Needed! (in Off-topic)
December 19 2006 5:44 PM EST
Hey all. I was just wondering if anyone could tell me what the code was for the dropdown style menus that Jonathon uses here on CB in the left frame. Or, if I could get the code right from you Jon, that'd be really helpful, I'm trying to do a website for school and I really like that feature
December 19 2006 5:50 PM EST
On left frame, do right click -> 'this frame' -> 'view source'.
December 19 2006 5:57 PM EST
Then jump into the haystack. Honest, there's a needle there somewhere ;)
December 19 2006 6:03 PM EST
*cries after reading through some of the code* I see it... I just don't know how to work it...
December 19 2006 6:09 PM EST
Just look for the obvious things...
It's a menu, so wouldn't the file 'menu2.js' be of any interest?
Then scroll a little down and notice all those addMenuItem lines, could they have anything to do with menu items? ;)
The remainder of the code looks like it is for other things in CB, so ignore those for now ;)
December 19 2006 6:16 PM EST
Basically you have to create a Menu object, call addMenuItem a bunch of times, then add MM_showMenu as a mouseover event.
It's pretty old code, you can probably find better menu js out there somewhere... The problem is most js menu generators either don't support the features you need, or have so many features it's impossible to figure out how to use them. :)
Raven, you can also try to figure out the one here: http://www.defhoboz.biz/
It's kind of cheesy, but pretty easy if you copy and paste all the surrounding code.
Also, the front page of my site (listed up there -^) pulls a randomly generated joke from this other site and displays it on the front page, so watch out, sometimes it uses non-pg words.
This thread is closed to new posts.
However, you are welcome to reference it
from a new thread; link this with the html
<a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=001yuL">Coding Help Needed!</a>