faqts : Computers : Programming : Languages : JavaScript : Links

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

24 of 40 people (60%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

JavaScript: Window: Close: Hyperlink: Create: How to create hyperlink to close window in JavaScript?

Jan 6th, 2005 09:25
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 06 January 2005 - 06:27 pm --------------------

JavaScript: Window: Close: Hyperlink: Create: How to create hyperlink 
to close window in JavaScript?

---


in general:

--- cut here: begin --------------------------------------------------

<A
  HREF="#"
  ONCLICK='
   self.close();
  '
>
 Your text comes here
</A>

--- cut here: end ----------------------------------------------------

or also:

--- cut here: begin --------------------------------------------------

<A
  HREF="#"
  ONCLICK='
   window.close();
  '
>
 Your text comes here
</A>

--- cut here: end ----------------------------------------------------

or also:

--- cut here: begin --------------------------------------------------

<A
  HREF="javascript: self.close();"
>
 Your text comes here
</A>

--- cut here: end ----------------------------------------------------

or also:

--- cut here: begin --------------------------------------------------

<A
  HREF="javascript: window.close();"
>
 Your text comes here
</A>

--- cut here: end ----------------------------------------------------

e.g.

--- cut here: begin --------------------------------------------------

<!-------------------------------------------------------------------->
<HTML>
<!-------------------------------------------------------------------->
<BODY>
<!-------------------------------------------------------------------->
<A
  HREF="javascript: window.close();"
>
 Close window
</A>
<!-------------------------------------------------------------------->
</BODY>
<!-------------------------------------------------------------------->
</HTML>
<!-------------------------------------------------------------------->

--- cut here: end ----------------------------------------------------

---
---

e.g.

--- cut here: begin --------------------------------------------------

<!-------------------------------------------------------------------->
<HTML>
<!-------------------------------------------------------------------->
<BODY>
<!-------------------------------------------------------------------->
<A
  HREF="#"
  ONCLICK='
   self.close();
  '
>
 Close window
</A>
<!-------------------------------------------------------------------->
</BODY>
<!-------------------------------------------------------------------->
</HTML>
<!-------------------------------------------------------------------->

--- cut here: end ----------------------------------------------------

---
---

Internet: see also:

---



----------------------------------------------------------------------