473,503 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Close navigator by commande in html

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>

Feb 27 '07 #1
1 1471
<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
Feb 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3808
by: Marc | last post by:
I am trying to create a new window from which the original page can close that new window. For some reason the following code will not work. Passing the window.open command to a variable called...
6
2658
by: andrewkooi | last post by:
Greetings, I do not know whether such code exist but no harm asking: Is it possible for me to make visible a close button if the active window is a popup window or a new window (other than the...
4
2186
by: ...D. | last post by:
OK. I am halfway decent with HTML. Now I want to try javascript for some things that HTML cannot do. I have looked over a tutorial & all. What I want to do is create a button, that when...
4
5647
by: Colin Graham | last post by:
Hi guys, Just a quickie here that i hope someone can help me with. Basically i want stop the user from closing the popup window using the small x button in the top right hand corner. Im aware...
6
12795
by: Sujan | last post by:
Hello all, Help me! -------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <script language="JavaScript"> <!--
4
2427
by: SAI | last post by:
Both have "TextBox" element and "Runat server". I don't understand the difference. Please advise. Thanks.
7
19241
by: MichaelK | last post by:
What's the best way to close current window silently after finished a process. I'm using the the javascritpt window.close() or top.window.close(), but it fires a confirmation window. Just want to...
1
1059
by: hisree | last post by:
hi ricp thnx for reply to my posted problem , i hve another problem, i hve created 2 html files ,load.html and adminhome.html , when i open in browser load.html , automatically open...
10
6931
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.