Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
255 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
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 

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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
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 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…

719 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