Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 29th, 2007, 12:09 AM
Authorized User
 
Join Date: Jun 2007
Location: , , .
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ivanlaw Send a message via Yahoo to ivanlaw
Default Urgent:Javascript

Hi~all pros,

Could anyone tell me how to use javascript coding to unload a web page???
Waiting for you advice...

Thank you.

  #2 (permalink)  
Old August 29th, 2007, 06:09 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what do you mean unload a webpage???

__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
  #3 (permalink)  
Old August 31st, 2007, 08:13 PM
Authorized User
 
Join Date: Jun 2007
Location: , , .
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ivanlaw Send a message via Yahoo to ivanlaw
Default

For example:
If I press the Logout button,then all the web page window will automatically close.That's all only.
Waiting for you advice...

Thank you.



  #4 (permalink)  
Old September 3rd, 2007, 08:22 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Simply use window.close() method which will close the current webpage.

Regards
Mike

To the world you might be one person,
but for someone you might be the whole world.
  #5 (permalink)  
Old September 3rd, 2007, 08:22 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

However, if you are not closing a pop up window, but a complete page, use the following:

window.opener=null;window.close()

Regards
Mike

To the world you might be one person,
but for someone you might be the whole world.
  #6 (permalink)  
Old September 4th, 2007, 08:18 PM
Authorized User
 
Join Date: Jun 2007
Location: , , .
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ivanlaw Send a message via Yahoo to ivanlaw
Default

Hi there,
Thank you for giving advices,I think that is what I want it.

Thank you very much.



Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent help on javascript sansircar ASP.NET 1.0 and 1.1 Professional 9 August 3rd, 2006 01:23 AM
Flash and Javascript (VERY URGENT) Apocolypse2005 Javascript 3 July 2nd, 2006 02:12 PM
How to load c++ dll using javascript(urgent) faisal79 Javascript 1 May 30th, 2006 07:51 PM
Urgent help in javascript madhu Javascript How-To 1 October 21st, 2004 04:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.