Click to See Complete Forum and Search --> : i need javascript with frames help


Amiga
01-12-2003, 09:31 AM
Hi

i'm using the pulldown menu javascript from the javascript source site ( http://javascript.internet.com/navigation/menu-frames.html ) on a frameset with 5 frames. i need the main frameset page to change using the pull down menu which i can do by using the bit of javascript

parent.top.location.href=(form.dest.options[myindex].value);

however i also have my domain name displayed in the URL field of the browser all the time using a hidden frame....but when i use the pull down menu javacript it shows the real URL of the pages in the browser. so is there anyway to keep my domain name in the browser URL field while using the pull down menu javascipt?

thanks for any help or sugestions :)

pyro
01-12-2003, 09:36 AM
It is possible the by using parent.top.location you are getting your error. Change to

parent.framename.location.href=(form.dest.options[myindex].value);

if top was your framename, switch to something else. top is a javascript reserved word...

Michael Dibbets
01-12-2003, 09:50 AM
in javascript self stands for the frame displaying the current page
so you should use self.location.href=(form.dest.options[myindex].value);

pyro
01-12-2003, 09:54 AM
Originally posted by Michael Dibbets
in javascript self stands for the frame displaying the current page
so you should use self.location.href=(form.dest.options[myindex].value); That would be all fine and dandy, except he doesn't need the frames he is currently in. He needs the one he wants the content to load in... :D

Amiga
01-12-2003, 10:30 AM
thanks for the swift response :)

putting the name of one of the frames in does change that frame however its not one of the frames thats i need to change but the whole frameset page that displays the frames.

is there a way to make that change?

pyro
01-12-2003, 12:14 PM
how about this...

top.location.href=(form.dest.options[myindex].value);