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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing a Window with a Button

Status
Not open for further replies.

justinf

Technical User
Feb 19, 2001
2
US

Here's the situation:

I have a main html page which upon a button click, launches a pre-sized pop up window. In this window, you can navigate through some images using a next and back button. The problem is, I would like to add a close button as well that would shut the window but I am not sure of the html needed to make this work.

Any help would be much appreciated.
 
Justin,

The HTML goes like this:

Text Link:
<a href=&quot;JavaScript:OnClick=self.close()&quot;>Close Window</a>

Button:
<input type=&quot;button&quot; name=&quot;close&quot; value=&quot;Close Window&quot; onClick=&quot;javascript:self.close()&quot;>

There's actually a great extension for this on the Macromedia Exchange website. It's called &quot;Close Child Window&quot;. (I just downloaded it myself yesterday.) A popup menu allows you to choose to insert the HTML for a text link, button, or custom graphic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top