Solved

How to compare two fields (email adresses) in a Frontpage form (no validation-just make shure they are the same) before (!!) onsubmit checking ?

Posted on 2004-09-14
11
248 Views
Last Modified: 2013-12-24
I want two see if the content of two fields email_01 and email_02 is the same in a Frontpage form. No validation of the email adres needed. Just compare the two fields.
I would like the check to be made before clicking the submit button since onsubmit is handled to my knowledge by the FP server extensions webbot and I do not know if its alowed to change anything here.I want to make shure no mistakes are made in typing an email adres.
Hope this is clear since I'm Dutch speaking.
0
Comment
Question by:etubex
  • 5
  • 4
11 Comments
 
LVL 29

Expert Comment

by:coreybryant
ID: 12056696
You will need to use a Javacript.  Something like:
<head>
script type="text/javascript" language="JavaScript">
<!--
function checkEmail(theForm) {
    if (theForm.EMAIL_1.value != theForm.EMAIL_2.value)
    {
        alert('Those emails don\'t match!');
        return false;
    } else {
        return true;
    }
}
//-->
</script>
</head>
<body>

<form action="../" onsubmit="return checkEmail(this);">
<p> Enter Your Email Address:<br>
<input type="TEXT" name="EMAIL_1" size="20" maxlength="20">
<br>
Please Confirm Your Email Address:
<br>
<input type="TEXT" name="EMAIL_2" size="20" maxlength="20">
<br>
<input type="SUBMIT" value="Send Address!"></p>
</form>
</body>
-Corey
0
 

Author Comment

by:etubex
ID: 12058305
Sorry, I'm not an expert.
Now I have in my form <FORM METHOD="POST" name="FrontPage_Form1" action="--WEBBOT-SELF--" onSubmit="return FrontPage_Form1_Validator(this)">

Where and how do I put the line from this javascript <form action="../" onsubmit="return checkEmail(this);"> ??

0
 
LVL 29

Expert Comment

by:coreybryant
ID: 12058377
Well you already have an action in there.  (action="--WEBBOT-SELF--" ) - what else are you validating?  I am not certain if yo can use two different 'validators' on the same form

-Corey
0
 

Author Comment

by:etubex
ID: 12063052
Sorry,This doesn't workwith me. Apparently you cannot have two onsubmit handlers on one form. Also my question was if its possible to compare the two fields BEFORE onsubmit.
Maybe it isn't ?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 29

Expert Comment

by:coreybryant
ID: 12063583
Yes it is.  The code I gave you will but since you are using Fp form verification - and that does not allow it - you will eed to consider a JS function for everthing.

What are the fields you are needing to verify?  

-Corey
0
 

Author Comment

by:etubex
ID: 12063966
the fields are email_01 and email_02
Eric
0
 
LVL 29

Expert Comment

by:coreybryant
ID: 12064029
But what else you are trying to verify?  return FrontPage_Form1_Validator(this) - this usually means you want other fields to be validated?  If you are not trying to verify any other fields - take this out & then you can use the code I gave you.

-Corey
0
 

Author Comment

by:etubex
ID: 12065669
There are some required fields in the form, for example
<!--WEBBOT
  BOT="Validation" B-Value-Required="TRUE" --><INPUT TYPE="text" NAME="Straat" SIZE="60" TABINDEX="3">
fields that may not be empty.Its basically a form for online sollicitation where we want the user obligatory tell us his name,birtdate,street,phonenumber etc... All those fields are marked as required. I guess thats what's the FP Bot is validating.
Eric
0
 
LVL 29

Accepted Solution

by:
coreybryant earned 125 total points
ID: 12066950
What I suggest - is use JS to validate all those fields.  This way you can use JS to validate the email etc

-Corey
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now