Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to close a form

Reply
Thread Tools

How to close a form

 
 
Steven Malcolm
Guest
Posts: n/a
 
      03-02-2004
Hello

I am totally new to HTML.

What I need is a way to close a form, i have already tried to use code like

<form>
<input type="button" value="Close Window" onClick="self.close()">
</form>

But this brings another little form saying that the form is trying to close
the window.

What I need is a button, but oes not ask if you want to close the for, just
closes.


TIA


Steven


 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      03-02-2004
On Tue, 2 Mar 2004 16:28:14 +1100, "Steven Malcolm"
<(E-Mail Removed)> declared in alt.html:

> What I need is a way to close a form


</form>

> But this brings another little form saying that the form is trying to close
> the window.


So you actually want to close the window, not a form. See that X in the
top right-hand corner of the window? That's what that is for.

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Reply With Quote
 
 
 
 
dave conz
Guest
Posts: n/a
 
      03-02-2004
Steven Malcolm wrote:

> Hello
>
> I am totally new to HTML.
>
> What I need is a way to close a form, i have already tried to use code like
>
> <form>
> <input type="button" value="Close Window" onClick="self.close()">
> </form>
>
> But this brings another little form saying that the form is trying to close
> the window.
>
> What I need is a button, but oes not ask if you want to close the for, just
> closes.
>
>
> TIA
>
>
> Steven
>

The alert you are seeing is a browser function, quite rightly informing
the user that something on the page is trying to close the window. You
cannot change it.
-dave
-------------------
http://www.mediacollege.com - Free video & electronic media resources

 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      03-02-2004

"dave conz" <(E-Mail Removed)> wrote in message
news:vSV0c.7765$(E-Mail Removed)...
> Steven Malcolm wrote:
>
> > Hello
> >
> > I am totally new to HTML.
> >
> > What I need is a way to close a form, i have already tried to use code

like
> >
> > <form>
> > <input type="button" value="Close Window"

onClick="self.close()">
> > </form>
> >
> > But this brings another little form saying that the form is trying to

close
> > the window.
> >
> > What I need is a button, but oes not ask if you want to close the for,

just
> > closes.
> >
> >
> > TIA
> >
> >
> > Steven
> >

> The alert you are seeing is a browser function, quite rightly informing
> the user that something on the page is trying to close the window. You
> cannot change it.
> -dave



Yes you can If the browser window was "created" (popped-up) by a script,
then the the window.close(); event will not trigger the message if the child
window or the parent window triggers the event... But if it's a regular
window, you cant avoid the message.


 
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
Why does JdbcRowSetImpl.close() close the database connection? Paul van Rossem Java 0 04-07-2005 07:01 PM
close child form when parent form is closed. =?Utf-8?B?UGF1bA==?= ASP .Net 2 11-24-2004 10:31 AM
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