🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.javascript
Article #8

Re: Submitting a form with a javascript

#8
From: Greg Griffiths
Date: Tue, 11 Sep 2001 19:10
17 lines
1682 bytes
You have two choices :

1. Add a document.<form name>.submit() call at the end of your validation
2. add your validation as an onsubmit component of your Form.

Allen Brooker wrote:

> Hi all,
>
> I need to know how to submit a form using a javascript.
> Scenario:
> I have a form. When the submit button is clicked I want it to call a
> javascript which checks that the necessary fields have been filled in,
> then submit the form using the 'post' method to a Perl CGI script.
>
> TIA
> Allen
Technical Details
Message-ID: <3B9E618D.666E591B@surfaid.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!newspeer.highwayone.net!diablo.theplanet.net!news.theplanet.net!not-for-mail
References: <Usenet.biqnknoi@localhost>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb3cb,38ccfcd2b6e42ff2
X-Google-Attributes: gidfb3cb,public
X-Google-Thread: 100e17,38ccfcd2b6e42ff2
X-Google-Attributes: gid100e17,public
X-Google-ArrivalTime: 2001-09-11 12:18:32 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!newspeer.highwayone.net!diablo.theplanet.net!news.theplanet.net!not-for-mail
From: Greg Griffiths <greg2@surfaid.org>
Newsgroups: comp.lang.javascript,alive.internet.lang.javascript
Subject: Re: Submitting a form with a javascript
Date: Tue, 11 Sep 2001 20:10:05 +0100
Lines: 18
Message-ID: <3B9E618D.666E591B@surfaid.org>
References: <Usenet.biqnknoi@localhost>
NNTP-Posting-Host: modem-200.diglett.dialup.pol.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news6.svr.pol.co.uk 1000235911 8271 217.135.109.200 (11 Sep 2001 19:18:31 GMT)
NNTP-Posting-Date: 11 Sep 2001 19:18:31 GMT
X-Complaints-To: abuse@theplanet.net
X-Mailer: Mozilla 4.73 [en] (Win98; I)
X-Accept-Language: en
To: Allen Brooker <allen@brooker.gb.net>