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
253 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to Import and export files in WordPress. 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 : Click on Too…

734 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