Chris
"SienaRot" <bimm...@home.com> wrote in message
news:3903D655...@home.com...
> I was wondering how I get it so that if a certain blank in my form isn't
> filled out, the form won't be submitted. For instance, if I asked some
> information on my form, but I wanted to have the users name and address
> filled in for sure, and if it wasn't filled in, it would go to a page
> and say "Please fill out your name and address and resubmit", how would
> I do this?? Is there some sort of HTML coding for that, or is it CGI??
>
> Derrick
>
>
It's CGI.
--
Jon
Micro-FAQ: http://hyweljenkins.com/support/mfaq.htm
FAQ: http://www.sbrady.com/hotsource/faqs/alt-html-faq.html
HTML tutorials, etc: http://www.vortex-webdesign.com/help.htm
Site design and hosting: http://www.kcmediapro.com/
Its CGI and perhaps JavaScript. In a somewhat elaborate case that would
not be warranted on a simple form one would use JS to verify the input
prior to submission - when the submit button is clicked an onClick event
would trigger the JS verification, and any error messages you wish could
be generated via JS. However, JS is not always available in which case
the verification will be done server side. The JS could append a
'data=js_checked' to the form submission to avoid some processor time.
In any case the CGI does the final checking and can generate more
warnings as needed. But the from does get submitted here, that part is
necessary to verify it at the server level.
For some simple Perl/CGI verification take a look at my guestbook
script:
http://rock13.com/webhelp/perl/gb/
If the name and comments aren't filled in the form gets regenerated.
--
Rob
http://rock13.com/
Fight Spam - http://www.cauce.org/
>
>SienaRot <bimm...@home.com> wrote in message
>news:3903D655...@home.com...
>> I was wondering how I get it so that if a certain blank in my form isn't
>> filled out, the form won't be submitted
><snip>
>> Is there some sort of HTML coding for that, or is it CGI??
>
>It's CGI.
Definitely use CGI, and also do some validation using javascript -
that way people with javascript enabled benefit from the reduction of
the number of response/request communications with your server -
especially useful if you have bandwidth restrictions.
Iso.
--
alt.html microFAQ: http://hyweljenkins.com/support/mfaq.htm
HTML FAQ: http://www.htmlhelp.com/faq/html/all.html
Jukka's Usenet guide: http://www.hut.fi/u/jkorpela/usenet/
Hiding source code: http://www.vortex-webdesign.com/help/hidesource.htm
>I was wondering how I get it so that if a certain blank in my form isn't
>filled out, the form won't be submitted.
You cannot. You can reduce the odds for such events, but the means
depend on the form and on the context.
>Is there some sort of HTML coding for that, or is it CGI??
No.
There's nothing in HTML you could use for that. And CGI scripts handle
form data that _has been_ submitted. They could, and indeed should,
politely reject them - hopefully giving the user a second chance - if
the data is incomplete. But they cannot prevent forms from being
submitted.
JavaScript can be used to prevent form submission in some situations,
but since your form handling must be prepared to getting data from any
source (including a browser with JavaScript disabled), it's best to
start from the server-side solution. See
http://www.hut.fi/u/jkorpela/forms/
for pointers to tutorials and references on forms.
--
Yucca, http://www.hut.fi/u/jkorpela/
Audiatur et ALTera pars.
Now check your required blanks: this.blank1 (or whatever your named
them).
If all is well, return true.
if not, then use alert() to tell the user what they need to file in and
pass false back.
In article <3903D655...@home.com>,
SienaRot <bimm...@home.com> wrote:
> I was wondering how I get it so that if a certain blank in my form
isn't
> filled out, the form won't be submitted. For instance, if I asked
some
> information on my form, but I wanted to have the users name and
address
> filled in for sure, and if it wasn't filled in, it would go to a page
> and say "Please fill out your name and address and resubmit", how
would
> I do this?? Is there some sort of HTML coding for that, or is it
CGI??
>
> Derrick
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.