PDA

View Full Version : hyperlinks and frames


koblitz
12-13-2002, 07:22 PM
Can this be done in one window. Open the page index.htm which contains two frames; top ( top.htm) and main ( home.htm). Then change the page displayed in the main frame. example change home.htm to home2.htm. It seems like a simple enough idea, but all my testing has failed.

Thanks
Dave

PS. My company has asked that I create a survey. My thought is to email out a hyperlink that opens our default intranet site and changes the page opened in the frame main from home.htm to survey.htm. I can do this if I change the index.htm to server side and code it, but I was hoping not to. This way all the menus continue to work without having to make a copy and maintain another page. Hope this makes sense.

requestcode
12-13-2002, 07:53 PM
To change the location in one frame from another you would use this format: parent.frame_name.location="page.html"

Or without javascript you could use the target attribute in a hyper link like this:
<A HREF="home2.html" TARGET="main">Click ME</A>

If you want it to happen on page load then you will need to give us some more details.