...

View Full Version : HELP: I need a script...



siflaar
08-05-2002, 03:06 PM
Hello All,

I'm looking for a script that will do the following:

I have two combo boxes (in Frame Top)
1) In box 1 you select a letter from A to Z (index)
2) In box 2 you select the catagories belong to the selection from box 1 (so the options from box 2 should depent on the selection of box 1)

e.g. box 1 : M
box 2 should give me the options: Message, Mistic, Music, ...

When I make a selection from the second combo box. Then I press a button (picture) and it should do the following

Opening in Frame Bottom a document with a name from Box 1 and going to the bookmark on that document from Box 2

Box 1 = M
Box 2 = Music
Open in Bottom frame document M.html#Music

Maybe this is easy, maybe not but thanks in advance.:thumbsup:

ShriekForth
08-05-2002, 03:56 PM
This has been requested before, but I can't seem to find the thread it was in. I believe that this is what you are looking for, or will at least put you 90% of the way there. http://javascriptkit.com/script/cut183.shtml

A change to the target of the frame that contains this double combo box will make the requested page apear below. Simply add your bookmarks to each group of links.

group[0][0]=new Option("Music","http://localhost.com/M.html#Music")


ShriekForth

siflaar
08-05-2002, 04:06 PM
Hello ShriekForth,

Thanks. I looked at the script but can't see how it is loading the document in the bottom frame.
Any suggestions to change the script?

ShriekForth
08-05-2002, 04:55 PM
in the source of your top frame you need to add the following html, <base target="mainFrameName">. That will be an easy html fix, or you could reference the bottom frame in the go function.



function go(){
window.mainFrameName.location=temp.options[temp.selectedIndex].value
}



adding the window.Frame reference should also do it with the correct frame name in place.

ShriekForth

siflaar
08-05-2002, 06:37 PM
Thanks,

I'll give it a try :cool:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum