Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

how can I close my browser from with in my home page

  • 6 replies
  • 1 has this problem
  • 33 views
  • Last reply by steve61

more options

I wish to close my browser from my home page , i am using html and writing it with 'dreamweaver 8

I wish to close my browser from my home page , i am using html and writing it with 'dreamweaver 8

All Replies (6)

more options

Hi Steve, do you mean you want to be able to use a script in the page itself to close the tab containing that page?

Most likely you can't do it that way. Firefox ignores attempts by web page scripts to close the current tab unless a script also was used to open the current tab. Usually that would not apply to your home page, since that opens automatically with Firefox.

For more information: https://developer.mozilla.org/docs/Web/API/Window/close

more options

sorry no not quite i am trying to close the browser from a web page not the home page,

here is what i have done so far

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-image: url(papyrus7.jpg); } .style1 {font-size: 36px} --> </style>






very well,
untill we meet again

<embed name="ttfn" src="TheForce.wav" width="103" height="19" loop="false" autostart="true">
<script type="text/javascript"> function closeme() { window.open('', '_blank', ''); window.close(); } </script> close


the <script> at the bottom and the <a href > only give me a blank page i want to cloes the browser completly

more options

steve61 said

<script type="text/javascript">
    function closeme() {
        window.open('', '_blank', '');
        window.close();
    }
</script>

It's not surprising that you are launching a new tab/window, since you are using window.open() with a target of _blank. And it's not surprising that window.close() fails for the reason I explained before.

You may want to explore other sites for additional information: Where to go for developer support.

more options

yes i realize after the fact thats all it did i can't find any thing that will alouw me to close the browser, they all give 'close window' scripts, one i found was reported to work in 'IE' but i could not findsomething for 'ff'

the page sent you starts from a link in my home page here is that page again

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-image: url(papyrus7.jpg); } .style1 {font-size: 36px} --> </style>






very well,
untill we meet again

<embed name="ttfn" src="TheForce.wav" width="103" height="19" loop="false" autostart="true">

**********

where the stars are i am wanting to close the browser maybe with the word s 'browser now colsing' coming up on the screen

your help is much apreshiated (evin if i can't spell)

more options

What I am saying is, being unable to close that tab is on purpose: window.close() is intentionally blocked on windows that were not opened by scripts. If there is a workaround, it is a security flaw that should be closed.

more options

ok thanks for your help any way

steve