Click to See Complete Forum and Search --> : Automatic Pulldown Menu in Frames


JessBlair
04-25-2003, 12:28 PM
I'm trying to put an automatic pulldown menu on my webpage. I got the code off of JavaScript Source, but something isn't working right. I can't get the pulldown links to target to the right frame. It always says something like "object blah blah blah does not exist". Can anyone help??

Jess

AdamBrill
04-25-2003, 12:30 PM
Hmm.. which code are you using? Could you either post the code or a link to where I can get it?

Jona
04-25-2003, 12:31 PM
Error: Object Expected means that an event has occurred, and that event has called a function that does not exist. This is usually something like: <a href="javascript:noFunc()">this causes an error</a> because there is no function noFunc(){ } that exists in the document.

In other words, check your HTML first. Then tell us.. Is your "dropdown" menu a <select> box or a DHTML menu?

JessBlair
04-25-2003, 12:33 PM
http://javascript.internet.com/navigation/menu-auto-frames.html

Here's the link to the code i tried to use. I hope this can give you a little insight.

JessBlair
04-25-2003, 12:34 PM
I do believe that the error said "object parent.right.location does not exist"

Jona
04-25-2003, 12:50 PM
Okay, you have to name your frame. What is the name of the frame that you're linking to (not the one with the dropdown menu)?

JessBlair
04-25-2003, 12:51 PM
To the best of my knowledge it's just called "right". I mean that's where it's supposed to target.

AdamBrill
04-25-2003, 12:54 PM
Here, try this code. Just unzip it and run index.htm. Then it will have the drop-down box on the left. Click one of them and it will follow the link... I hope that helps!

JessBlair
04-25-2003, 12:58 PM
The index.htm didn't quite work. It came up with the frames but nothing in them. And when i looked at "left" it said "error: parent.right.location is null or not an object". This is SO frustrating.

Jona
04-25-2003, 12:58 PM
I would try top.frames['right'].location.href

AdamBrill
04-25-2003, 01:15 PM
Did you put all three files in the same folder? If you did, it should have worked... hmm.. it worked for me. BTW, if you open left.htm by itself, it won't work. It has to be in frames in order to work... If it still doesn't work, let me know and I'll upload it onto my server. That way you can at least see if it is working...

Jona
04-25-2003, 01:19 PM
Works for me, too, Adam... What browser are you using, Jess?

JessBlair
04-25-2003, 01:23 PM
I'm running internet explorer.

Jona
04-25-2003, 01:24 PM
I am too, but unless you're running IE3, that code should work! :eek:

Dunno what you're doing.... Can you show us a page or something? A link would be nice... Since source code isn't getting us anywhere.

JessBlair
04-25-2003, 01:26 PM
well the link to my page is www.geocities.com/twrlr_grl/frames.html. I'm wanting to put my picture pages in dropdown menu. Hope that helps a little.

AdamBrill
04-25-2003, 01:27 PM
Try going here (http://code4ever.com/blair) and see if it works...

JessBlair
04-25-2003, 01:29 PM
OK Adam... that worked. Now HOW do i get it to work on my page?! LOL. I have a glimmer of hope now.

Jona
04-25-2003, 01:31 PM
I don't see a "dropdown menu" on your frame.

JessBlair
04-25-2003, 01:32 PM
I took it out cuz it wasn't working.

Jona
04-25-2003, 01:33 PM
View the source of Adam's page (the left frame) and put that code onto your left frame. Then try it.

JessBlair
04-25-2003, 01:58 PM
GOOD NEWS!!! IT WORKED!!! Thanks a lot for all your help. If you wanna check out the finished product the addy to my site is www.geocities.com/twrlr_grl/frames.html. THANKS AGAIN!

Jona
04-25-2003, 02:01 PM
Hope you learned a lot...