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
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

 

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
 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

626 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