Article View: comp.lang.javascript
Article #10Re: Submitting a form with a javascript
From: Hywel Jenkins
Date: Sat, 29 Sep 2001 10:06
Date: Sat, 29 Sep 2001 10:06
41 lines
2499 bytes
2499 bytes
In article <3bb52d85.2430945@news.mindspring.com>, never@ever.net says... > Allen, > > Feel free to check out the code on my contact page: > > http://www.rawconfusion.com/contact.htm > > It will submit the form purely through javascript. > > I hope that helps It doesn't work: <form name="Mail" action="mailto:design@rawconfusion.com? subject=RawConfusion Comments" For starters, mailto: as a form action is unreliable - you'll never know whether the mail client even tried to send the message, whether it killed the user's browser or machine, or one of a variety of other problems. Secondly, you've added the subject to the mailto URL. That's bad - it's a malformed URL, and can result in lost mail, mail client freezing, etc. Thirdly, you've mixed a GET querystring with a POST method. Read this: http://allmyfaqs.com/cgi-bin/wiki.pl?Top-posting_or_bottom-posting > On Sat, 8 Sep 2001 11:11:22 +0100, Allen Brooker > <allen@brooker.gb.net> wrote: > >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. -- Hywel I do not eat quiche Web Site http://hyweljenkins.com/ WIP http://hyweljenkins.co.uk/ MicroFAQ http://hyweljenkins.co.uk/mfaq.php
Technical Details
Message-ID:
<MPG.161fad72601b1eb39896f2@news.freeserve.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!diablo.theplanet.net!news.theplanet.net!not-for-mailReferences:
<Usenet.biqnknoi@localhost> <3bb52d85.2430945@news.mindspring.com>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-29 03:06:22 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!diablo.theplanet.net!news.theplanet.net!not-for-mail From: Hywel Jenkins <hyweljenkins@hotmail.com> Newsgroups: comp.lang.javascript,alive.internet.lang.javascript Subject: Re: Submitting a form with a javascript Date: Sat, 29 Sep 2001 11:06:10 +0100 Lines: 41 Message-ID: <MPG.161fad72601b1eb39896f2@news.freeserve.net> References: <Usenet.biqnknoi@localhost> <3bb52d85.2430945@news.mindspring.com> NNTP-Posting-Host: modem-683.ballistic.dialup.pol.co.uk X-Trace: newsg4.svr.pol.co.uk 1001757977 11042 62.25.138.171 (29 Sep 2001 10:06:17 GMT) NNTP-Posting-Date: 29 Sep 2001 10:06:17 GMT X-Complaints-To: abuse@theplanet.net X-Newsreader: MicroPlanet Gravity v2.30