GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need simple javascript help (https://gfy.com/showthread.php?t=433139)

bangman 02-17-2005 01:49 PM

Need simple javascript help
 
Ok, I have a page that is split into two frames.
I want to have a link in the top frame, that when clicked, will close itself and leave only the bottom frame.
How can I do this?

psili 02-17-2005 01:52 PM

target="_top" ?

bangman 02-17-2005 02:01 PM

Quote:

Originally Posted by psili
target="_top" ?

Well, I want the user to stay in the same page, I don't want a new window to pop up.

Tom_PM 02-17-2005 02:02 PM

self.close?

bangman 02-17-2005 02:06 PM

Quote:

Originally Posted by PR_Tom
self.close?

Tried that.
The format would be "<a href="javascript:self.close">link</a>" right?

Tom_PM 02-17-2005 02:12 PM

Or something like an onclick="window.close();" maybe.. that might throw up a warning though.
If it does, you could fool it by putting onClick="window.opener=self; window.close();"

psili 02-17-2005 02:18 PM

Quote:

Originally Posted by bangman
Well, I want the user to stay in the same page, I don't want a new window to pop up.


a href... target="_top"> just tells the browser to open the link in the outer-most frame of the current window -- basically it opens the link in the entire window eliminating all frames that currently reside in the window (not a new window, that would be target="_blank").

But I could be misunderstanding what you're talking about, too.

Anothers 02-17-2005 03:49 PM

you must reload bottom frame

suppose bottom frame name is "lisa"

just use something like this <a href="java_script:top.location.href=lisa.location. href;">click me</a>

just remove _

sorry i'm too drunk to write it easier

or just do it like this guy above me said

bangman 02-17-2005 03:58 PM

Thanks guys, appreciate it.


All times are GMT -7. The time now is 08:33 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123