We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:


PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom


It's free to register, to post a question or to start / join a discussion


 

Stop pop-up


Woody Ham

Likes # 0

I use Javascript to close a window but it creates a pop-up saying browser is trying to close window etc. Can i prevent this popup from appearing and just close the window?

Like this post
Forum Editor

Likes # 0

< a href="javascript:window.opener='x';window.close();">Close< /a>

Like this post
Woody Ham

Likes # 0

Many thanks. The line that closes my window (and puts up the popup is:

<a href="JavaScript:window.close(blank)">Close this window</a>

Where do I put your line: just after mine? If so, it does seem to help. Sorry if I'm being thick!

Like this post
Forum Editor

Likes # 0

for your line.

Like this post
Woody Ham

Likes # 0

I have substituted it but it still creates the popup. This is my code for the document. I use Dreamweaver with only reasonable knowledge of writing HTML.
START

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "click here">
<html xmlns="click here"><!-- InstanceBegin template="/Templates/tour.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="../St Dunstans.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!-- InstanceBeginEditable name="Main" -->
<table width="650" border="5" cellspacing="2">
<tr>
<th height="254" bgcolor="#CCCCCC" scope="col"><table width="600" border="2" cellspacing="2" bgcolor="#CCCCCC">
<tr>
<th width="290" bgcolor="#CCCCCC" scope="col"><div align="left">Title</div></th>
<th width="292" rowspan="4" valign="top" bgcolor="#CCCCCC" scope="col"><div align="center"><img src="images/organ.jpg" alt="Organ" width="397" height="298" /></div></th>
</tr>
<tr>
<td bgcolor="#CCCCCC">Organ</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><strong>Description</strong></td>
</tr>
<tr>
<td height="87" valign="top" bgcolor="#CCCCCC"><div align="left">The Banton organ was built and installed in the Heathside Crescent church in the expectation that it would be moved to this church. A third manual was added shortly before the move. </div></td>
</tr>
<tr>
<td height="25" colspan="2" bgcolor="#CCCCCC"><div align="right" class="adventheading">
<a href="javascript:window.opener='x';window.close();">Close</a>
</div></td>
</tr>
</table></th>
</tr>
</table>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>

END

Like this post

Reply to this topic

This thread has been locked.



IDG UK Sites

Amazon Fire HD 6 is a really good value tablet. The Amazon Fire HD 7 isn't. Amazon Fire HD 6 and...

IDG UK Sites

Why Sony's PS4 2.0 update is every gamer's dream (well, mine at least)

IDG UK Sites

ACLU's Halloween-themed animation warns of dangers of ignoring threats to your privacy

IDG UK Sites

20 lesser-known tips for Mac OS X Yosemite: use Yosemite like an expert