You can't close a window with javascript unless the window was opened with javascript.
If you try to, you'll see the message you posted. I don't know of any other work-arounds.
I've got on my page the classic "click-the-image-to-close-the-browser-thingy". My problem is, when I click the image, it tells me this:
"the web page you are trying to visit is trying to close the window
do you want to close the window?"
See, now if I click OK, it'll close the window, no problem. But I don't want that prompt coming up, what do I do to prevent this?
This is the code:
<form>
<img src="close.jpg" onClick="window.close()">
</form>
any ideas?
You can't close a window with javascript unless the window was opened with javascript.
If you try to, you'll see the message you posted. I don't know of any other work-arounds.
▀▄▀▄▀▄▀▄▀▄▀▄▀▄
▀▄▀▄▀▄▀▄▀▄▀▄▀▄
It prompts if there's more than one location in the history. If you want to override the prompt, clear the window's history.
I think I may have been here before... a long, long time ago... 599699 Unread Posts, you say?
Ah, I found my old avatar. The hypnotic evil duck.
It was 2002. Duck avatars were the style at the time.
Long and fascinating story there. I'd tell you if I remembered it.
What, did you think I made it up?Ha! That actually worked![]()
I think I may have been here before... a long, long time ago... 599699 Unread Posts, you say?
Ah, I found my old avatar. The hypnotic evil duck.
It was 2002. Duck avatars were the style at the time.
Long and fascinating story there. I'd tell you if I remembered it.
Actually, this works out well, cause I'm going to have it open through javascript.Originally posted by Bruce
You can't close a window with javascript unless the window was opened with javascript.
If you try to, you'll see the message you posted. I don't know of any other work-arounds.
He's Canadian, what do you expect?Originally posted by meow
Then what are you whining about?![]()
![]()
In all that we are losing
Aren't we just confusing
Youth with beauty?
Truth with duty?
Bookmarks