Close navigator by commande in html

S

sousimou

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>
 
L

-Lost

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top