<so******@gmail.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
>i want to ceate a comman buttum to close my web application. this
script dont work. can you cerrect it me than
<html>
<head>
<title</title>
</head>
<body>
<p><object classid="CLSID:D7053240-CE69-11CD-A777-00DD01143C57"
id=CommandButton1 width=96 height=32 >
<OnClick="javascript:window.close()">
</object</p>
</body>
</html>
You can only close a window via window.close() if it is first opened via window.open().
....and unless I am missing something, an event listener is called within the context of
the element. As in:
<p id="object" onclick="alert(this.id + ' was clicked.');">blah</p>
....or via obj.event = function;
Also, you do not use the "javascript" protocol within event listeners.
-Lost