PDA

View Full Version : Close browser button!


AluminX
08-12-2003, 09:35 AM
ok i want a button than when the user clicks it it closes the browser...
well i have one but this one asks me if i want to close the browser or not with an alert window...how do i do it without the alert window?
Link: http://www.geocities.com/hydrasweb/A.htm

here is the code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body>
<p><a href="javascript:void(window.close())" onClick="MM_openBrWindow('http://www.google.com','google','width=500,height=450')">Click
Here To Enter</a></p>

</body>
</html>

Note: Done with DreamWaver

Bonkom
08-12-2003, 09:42 AM
As far as i know you can only close a window without that message if you have opened the window yourself i.e

you have a link to open a new window and in that window is the script that you have to close the window

Bonkom :pimp:

Edit The above link will let the script work because when you click the link it opens a new window. to see the problem open a new window and then copy the address from the above.

AluminX
08-12-2003, 07:36 PM
I think i know thta r u talking about :D thnx dude