Email form field validation

R

Randy Morgan

I'm trying to figure out a way to do more robust form field validation.
In particular, I want to validate an email address field prior to
submission.

I prefer to do this on the client side, mainly because I'm pretty new at
this and server-side programming intimidates me.

At any rate, the email field is part of a larger form, and I use FP to
validate the required field. I have found Javascript that validate an
email field just fine and works in a stand-alone manner, but I can't
figure out how to integrate that into the FP form. I can integrate the
field just fine, but not the validation script. In code view I see some
webbot stuff and different syntax from the Javascript code I found.

I also want to have the user check a box before submitting a form so
that they explicitly agree to be added to a list, but as far as I can
tell FP won't validate that a checkbox has been checked.

So, is there a way to merge these into one, or do I need to just not use
FP tools for this form? Or, am I missing some more robust
form-validation tools in FP?

Thanks to those of you who took the time to read all this!

Randy
 
S

Stefan B Rusynko

See
http://msdn.microsoft.com/office/de...c_fpValidatingFormControlsUsingJavaScript.asp




| I'm trying to figure out a way to do more robust form field validation.
| In particular, I want to validate an email address field prior to
| submission.
|
| I prefer to do this on the client side, mainly because I'm pretty new at
| this and server-side programming intimidates me.
|
| At any rate, the email field is part of a larger form, and I use FP to
| validate the required field. I have found Javascript that validate an
| email field just fine and works in a stand-alone manner, but I can't
| figure out how to integrate that into the FP form. I can integrate the
| field just fine, but not the validation script. In code view I see some
| webbot stuff and different syntax from the Javascript code I found.
|
| I also want to have the user check a box before submitting a form so
| that they explicitly agree to be added to a list, but as far as I can
| tell FP won't validate that a checkbox has been checked.
|
| So, is there a way to merge these into one, or do I need to just not use
| FP tools for this form? Or, am I missing some more robust
| form-validation tools in FP?
|
| Thanks to those of you who took the time to read all this!
|
| Randy
 
R

Randy Morgan

Stefan said:
Thanks for the reference. It was very informative, but not does
directly address merging FP-generated script with other script. I've
been trying to do it without too much success, but I'm sure my
deteriorated coding skills are the problem.

It evens looks as though the script generated by FP (which I took from
the actual site after publishing) uses a different syntax than the
example code I found. In fact, I can't even seem to get the function
I'm trying to integrate (by adding another onsubmit command to the form
function) to run.

So, it's off to Google to look for a free Javascript debugger.

To those of you that suggest server-side scripting, I absolutely believe
you when you say it's easier, but I'm not even sure where to start
with that. I may simply be way in over my head, but that's what's fun
about programming, eh?
 
R

Randy Morgan

Randy said:
Thanks for the reference. It was very informative, but not does
directly address merging FP-generated script with other script. I've
been trying to do it without too much success, but I'm sure my
deteriorated coding skills are the problem.

It evens looks as though the script generated by FP (which I took from
the actual site after publishing) uses a different syntax than the
example code I found. In fact, I can't even seem to get the function
I'm trying to integrate (by adding another onsubmit command to the form
function) to run.

So, it's off to Google to look for a free Javascript debugger.

To those of you that suggest server-side scripting, I absolutely believe
you when you say it's easier, but I'm not even sure where to start
with that. I may simply be way in over my head, but that's what's fun
about programming, eh?

OK, I'm declaring that there's no real way to merge custom Javascript
with FP-generated Javascript. The bots and all just seem to do their
own thing during publishing, which includes flat erasing at least some
of the things it didn't create or weren't configured using FP.

So, I'm off to other things. Thanks to those who took the time to read
and respond.

Randy
 
S

Stefan B Rusynko

You can't use FP validation and a custom script together unless you either:
- rename your script to follow the FP form naming convention
- or copy the FP script from browser view source, then remove the FP validation and incorporate it in your script





| Randy Morgan wrote:
| > Stefan B Rusynko wrote:
| >
| >> See
| >>
http://msdn.microsoft.com/office/de...c_fpValidatingFormControlsUsingJavaScript.asp
| >>
| >>
| > Thanks for the reference. It was very informative, but not does
| > directly address merging FP-generated script with other script. I've
| > been trying to do it without too much success, but I'm sure my
| > deteriorated coding skills are the problem.
| >
| > It evens looks as though the script generated by FP (which I took from
| > the actual site after publishing) uses a different syntax than the
| > example code I found. In fact, I can't even seem to get the function
| > I'm trying to integrate (by adding another onsubmit command to the form
| > function) to run.
| >
| > So, it's off to Google to look for a free Javascript debugger.
| >
| > To those of you that suggest server-side scripting, I absolutely believe
| > you when you say it's easier, but I'm not even sure where to start
| > with that. I may simply be way in over my head, but that's what's fun
| > about programming, eh?
|
| OK, I'm declaring that there's no real way to merge custom Javascript
| with FP-generated Javascript. The bots and all just seem to do their
| own thing during publishing, which includes flat erasing at least some
| of the things it didn't create or weren't configured using FP.
|
| So, I'm off to other things. Thanks to those who took the time to read
| and respond.
|
| Randy
 
R

Randy Morgan

Stefan said:
You can't use FP validation and a custom script together unless you either:
- rename your script to follow the FP form naming convention
- or copy the FP script from browser view source, then remove the FP validation and incorporate it in your script
Yup, I have been finding that out the hard way!
 
K

Kevin Spencer

Well, there is one other option. Don't use FrontPage form validation at all,
and simply write your own validation script.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
R

Randy Morgan

Kevin said:
Well, there is one other option. Don't use FrontPage form validation at all,
and simply write your own validation script.
Yes, that's what I'm doing. So far, so good.
 
J

Jaymee Scott

Kevin Spencer said:
Well, there is one other option. Don't use FrontPage form validation at all,



Hi Kevin,

I don;t care so much about the validation but i need to get a form action
POST on a subdomain that only allow "get" action Form methods.
Javascript functions will sometimes work if I upload from word but usually I
just ammend the emailto line in the {page script}
Now what I run into is THEE issue of secure transmission and the length of
the form in ref to storage capacity and that stuff.
But really Kevin,
If you enter iyour cust info on a page --isn't it then a viable shortcut
that can be send as a .doc workaround for a form method post?

ie dreamprofit/Cust_info on Geocities.

Thanks. More on filter alerts next time.

Jaymee
 
S

surfyogi

Use the MS Script Editor included free with MS Office 2002 and above,
for debugging Internet Explorer (IE).

This subject is of great interest to many JS developers, as there is no
obvious, low cost way to do sophisticated debugging in
IE6 other than to use the debugger described below, which is horribly
documented otherwise. I feel debugging is an important aspect of
projecting the useability of the language and needs to be made more
clear for new users.


Jeff Papineau
(e-mail address removed)


<FAQENTRY>

This is a page that describes how to install and use the MS Script
Editor to debug Javascript in Internet Explorer ( IE ). It has a
powerful debugger built into it that works really well for developers
supporting IE5+. This debugger/editor included with most versions of
Microsoft Office.

http://www.mandala.com/javascript/debug_javascript.html

..NET programmers may have better tools (VStudio) but this comes in
really handy for anyone developing with JSP and PHP and other dynamic
scripting languages which embed javascript, as well as any HTML page
using Javascript in Internet Explorer that needs a (almost) free
debugging environment.

</FAQENTRY>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top