Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Close current web-page

Reply
Thread Tools

Close current web-page

 
 
cla
Guest
Posts: n/a
 
      09-14-2004
Hi to all,
In my web page I should put a link that once clicked on close the current page.
How is it possible in html? If not, is it possible in javascript?


Thanks
Cla

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      09-14-2004

"cla" <(E-Mail Removed)> wrote in message
news:26B1d.2247$(E-Mail Removed)...
> Hi to all,
> In my web page I should put a link that once clicked on close the current

page.
> How is it possible in html? If not, is it possible in javascript?


No.

What is wrong with the browsers close button. It works just like all the
other close buttons in all of the other applications your viewer has.

--
Cheers
Richard.


 
Reply With Quote
 
 
 
 
Karl Groves
Guest
Posts: n/a
 
      09-14-2004

"cla" <(E-Mail Removed)> wrote in message
news:26B1d.2247$(E-Mail Removed)...
> Hi to all,
> In my web page I should put a link that once clicked on close the current
> page.
> How is it possible in html? If not, is it possible in javascript?


Why do you want to close the user's window?
What makes you think that they won't want to go to a different site once
they're done with your site?

-Karl


 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      09-14-2004
On Tue, 14 Sep 2004 12:03:10 GMT, cla <(E-Mail Removed)> wrote:

> Hi to all,
> In my web page I should put a link that once clicked on close the
> current page.
> How is it possible in html? If not, is it possible in javascript?


There's only one good reason I can think of to do that and that's if
you're doing, say, a bank website and closing the browser will end the
session. Even then, it's better (and more reliable in the end) to tell the
user to do it manually.

There is no HTML solution, and no reliable Javascript solution which can
work for all users.
 
Reply With Quote
 
Jeffrey Silverman
Guest
Posts: n/a
 
      09-14-2004
On Tue, 14 Sep 2004 12:03:10 +0000, cla wrote:

> Hi to all,
> In my web page I should put a link that once clicked on close the current page.
> How is it possible in html? If not, is it possible in javascript?
>
>
> Thanks
> Cla


Not with plain 'ol HTML.

It is possible with JavaScript. And I'll even tell you how to do it:

window.close();

However you'll find that most sensible web designers/developers do not
like to use this technique, and that most users do not like to have their
window closed out from under them.

The only valid time I can imagine this being used is something like:

<a href="#" onClick="window.close()">Close This Window</a>

So that a user *action* closes this window. Not something automated.

However, I have always wondered what the heck is wrong with the window
manager's own "close" button -- the "X" in the upper-right corner in MS
Windows windows, or the whatchamajiggie in the upper left of MacOS
windows, (or, in my case -- KDE on Linux -- the "X" or whatchamajiggie in
whichever corner *I* decide to put it -- but that'll lead me to a long
winding diverted tangential conversation about Linux...um, oops, sorry.
Back to the subject at hand)

Although I will take my mother as the quintessential non-technical
computer user. For her, a large, bold, highlighted link "Close This
Window" is absolutely necessary else she won't remember about the "X" in
the upper-right corner. Of course, she also thought the CD ROM drive was a
built in cup holder***.

--
Jeffrey D. Silverman | http://www.velocityreviews.com/forums/(E-Mail Removed) **
Website | http://www.newtnotes.com

(** Drop "pants" to reply by email)

*** Not really. I stole that from off the 'net somewhere.
 
Reply With Quote
 
Karl Groves
Guest
Posts: n/a
 
      09-14-2004

"Jeffrey Silverman" <(E-Mail Removed)> wrote in message
news(E-Mail Removed).. .

>
> The only valid time I can imagine this being used is something like:
>
> <a href="#" onClick="window.close()">Close This Window</a>


Oh, a blank fragment identifier? That's cute.

-Karl


 
Reply With Quote
 
Jeffrey Silverman
Guest
Posts: n/a
 
      09-14-2004
On Tue, 14 Sep 2004 13:03:56 -0400, Karl Groves wrote:

> Oh, a blank fragment identifier? That's cute.
>
> -Karl


Huh? What, the pound sign?

It's just an example.

--
Jeffrey D. Silverman | (E-Mail Removed) **
Website | http://www.newtnotes.com

(** Drop "pants" to reply by email)

 
Reply With Quote
 
Hywel
Guest
Posts: n/a
 
      09-14-2004
In article <(E-Mail Removed)>, Jeffrey
Silverman says...
> On Tue, 14 Sep 2004 13:03:56 -0400, Karl Groves wrote:
>
> > Oh, a blank fragment identifier? That's cute.
> >
> > -Karl

>
> Huh? What, the pound sign?


That's a hash. This is a pound sign: £.

--
Hywel

http://sponsorhywel.org.uk/
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      09-14-2004
On Tue, 14 Sep 2004 19:52:26 +0100, Hywel <(E-Mail Removed)> wrote:

> In article <(E-Mail Removed)>, Jeffrey
> Silverman says...
>> On Tue, 14 Sep 2004 13:03:56 -0400, Karl Groves wrote:
>> > Oh, a blank fragment identifier? That's cute.

>> Huh? What, the pound sign?

> That's a hash. This is a pound sign: £.


# is, in fact, commonly referred to as the "pound sign" in the US,
regardless of its proper name. Also called the "number sign", the
"tic-tac-toe thingee" and "that funny-looking thing above the 3". I use it
to represent a sharp when typing chord symbols like F#m7(b5).

A rather versatile little guy, that ... what was it called?
 
Reply With Quote
 
Chris Beall
Guest
Posts: n/a
 
      09-14-2004
Neal wrote:

> A rather versatile little guy, that ... what was it called?


Octothorpe. See http://www.sigtel.com/tel_tech_octothorpe.html

Cheers,
Chris Beall

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) IƱaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
close current window using window.close() Shang Wenbin Javascript 10 09-02-2005 12:16 AM
Why does JdbcRowSetImpl.close() close the database connection? Paul van Rossem Java 0 04-07-2005 07:01 PM
JavaMail POP3 folder.close() method close also store! Daniel Albisser Java 1 04-07-2004 03:45 PM
How to close child browser while parent close? Denon ASP .Net 1 11-14-2003 08:14 AM



Advertisments