Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 04-14-2004, 06:06 PM   PM User | #1
wappo
New Coder

 
Join Date: Jul 2003
Location: england
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
wappo is an unknown quantity at this point
Onload window close

Is there a piece of coding that closes a window as soon as it opens,

thanks 4 ur help every1
wappo is offline   Reply With Quote
Old 04-14-2004, 06:14 PM   PM User | #2
wappo
New Coder

 
Join Date: Jul 2003
Location: england
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
wappo is an unknown quantity at this point
got it now!
<script>
window.close()
</script>
so easy hey!
wappo is offline   Reply With Quote
Old 04-14-2004, 06:16 PM   PM User | #3
zoobie
Senior Coder

 
Join Date: Jun 2002
Location: ColoRockyz
Posts: 1,638
Thanks: 1
Thanked 0 Times in 0 Posts
zoobie has a little shameless behaviour in the past
What window? The parent or child? Oh...you've got it...nebbermind.
__________________
Zoobie or not Zoobie...That is the problem.
<body onUnload="flush( ! )">
zoobie is offline   Reply With Quote
Old 04-15-2004, 02:13 AM   PM User | #4
shlagish
Senior Coder

 
Join Date: Apr 2003
Location: Canada
Posts: 1,063
Thanks: 2
Thanked 0 Times in 0 Posts
shlagish is an unknown quantity at this point
so as soon as the window opens... it closes itself?
Why would you want that?
__________________
Shawn
shlagish is offline   Reply With Quote
Old 04-15-2004, 02:53 PM   PM User | #5
wappo
New Coder

 
Join Date: Jul 2003
Location: england
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
wappo is an unknown quantity at this point
lol, its for this web program im developing about right clicking
wappo is offline   Reply With Quote
Old 04-15-2004, 03:23 PM   PM User | #6
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
By the way, this isn't a clever idea. Closing windows confuses people. Confusion is anti-usable.

In fact, Microsoft agrees with me. When you use window.close() with IE, a confirmation prompt pops up asking if you really want to do that.
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Old 04-15-2004, 10:13 PM   PM User | #7
shlagish
Senior Coder

 
Join Date: Apr 2003
Location: Canada
Posts: 1,063
Thanks: 2
Thanked 0 Times in 0 Posts
shlagish is an unknown quantity at this point
It's like if, when you open a book, it just closes in your face, quite funny, not quite usable
__________________
Shawn
shlagish is offline   Reply With Quote
Old 04-16-2004, 06:47 PM   PM User | #8
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,881
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair is an unknown quantity at this point
Actually it's pretty obvious that what he's really wanting to do is to close the page if someone right-clicks on it in another lame attempt to protect web page content.
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.
Roy Sinclair is offline   Reply With Quote
Old 04-16-2004, 06:48 PM   PM User | #9
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
Quote:
Originally Posted by Roy Sinclair
Actually it's pretty obvious that what he's really wanting to do is to close the page if someone right-clicks on it in another lame attempt to protect web page content.
So keeping with the book analogy, if you put it in a photocopier, it selfdestructs. Nice.
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:57 AM.