Masterpyro Posted September 28, 2006 Share Posted September 28, 2006 I have been working on this all night and get figure it out...I want to close 1 from with a button from the same one and have it reload the second frame(similar to google images banner). i have tried self.close(),window.frames[name].close() and all that other stuff and nothing works. I finally got it close to working except taht it closed the whole page. I am also stuck with a Back button(again similar to google images banner) that i want to have go back to the last page a user was on on my site. What i have is http://www.freewebs.com/tester14/test1.htm. From what i know i am limited to JS and HTML so im not sure this is possible. All help appreciated Masterpyro Moonlit: Link fixed. Quote Link to comment Share on other sites More sharing options...
Freakish Posted September 28, 2006 Share Posted September 28, 2006 It works in Firefox, just letting you know. Quote Link to comment Share on other sites More sharing options...
PoyBoy Posted September 28, 2006 Share Posted September 28, 2006 java script:window.close(); That might work Quote Link to comment Share on other sites More sharing options...
jool Posted September 28, 2006 Share Posted September 28, 2006 To remove the top frame in javascript all you need to do is to set window.top.location.href to the url of the lower frame. However, you cannot read the url from the lower frame from the top frame if the frames are on different domains for security reasons. So you will not be able to cleanly remove the top frame if the lower frame is on a different domain and you moved away from the inital page. You could set the height of the top frame to zero but that isn't a very nice solution since the url in the location field would be wrong. Quote Link to comment Share on other sites More sharing options...
barrytone Posted September 29, 2006 Share Posted September 29, 2006 The javascript for the back button only needs to be: history.go(-1) :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.