Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i get a frame to close the whole window??

Status
Not open for further replies.

estesflyer

Programmer
Dec 19, 2000
284
US
so far, I have this, but it keeps loading the main page inside the frame when i click close. like, i have a main window ok, I also have a search, when the user clicks the search button, a blank window comes up, and code is written to the blank window to give it frames, one frame window, (the bottom one) has a the search page loaded into it, the other one (the top window) has a message that reads: Click here to close this window after you are finished searching.
anyway, when they click on it, for some wierd reason, the main page is loaded into that frame, here is what i have for the link to close the new window from one of its frames.

Click <a href=&quot;&quot; onClick=&quot;self.close();&quot;>here</a> this window when you are finished searching plz.

- Rusty

TIA
 
Try to use

say if you have 2 frames...and you place this button in the top frame..

<input type=&quot;button&quot; value=&quot;Close Window&quot; onClick=&quot;window.top.close()&quot;>

I don't know if it'll work in Netscape but IE works fine... try it.

Regards,
Soon
 
I have frames and new windows and no problem in both
browsers, but I don't understand what do you need.
Can you send a link of the index?
 
Dear luciddream:
I decided to be nice today and pay off some debts,
by answering some questions in subjects I'm familiar with.
It clears my conscience,and than I don't feel I'm &quot;using&quot; people for my purposes, but helping too.
But you are here before me.
So I quit now.
Have fun :)
 
thanks soonkhoo, your post worked! the window.top.close() thing is one that i havent tried to use yet. I will try it as soon as i get home from school, thanks again!

btw, whats w/ the personal messages?
:)

- Rusty
 
I cant get , top.FrameName , not window.top.Framename, nor self.parent.framename to work in Netscape. tho I am trying to change the href (netscape Comm 4.76) Karl Blessing
aka kb244{fastHACK}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top