?
Solved

Required/Validate fields using DreamWeaver

Posted on 2003-03-19
10
Medium Priority
?
269 Views
Last Modified: 2012-05-04
Hello,

Should be quick and simple. I have a very simple sign up sheet on a small web page. There are certain fields that need to be required where I do not want the user to be allowed to move forward without entering information on the required fields. I want the message to pop up when they hit the submit button and not when they are tabbing through the individual fields. I was thinking of using Javascript to do so, but this is where my question lies. The submit button sends the information they enter via e-mail to me when the user hits the button. I have messed with the behavior options in DreamWeaver but since this signup sheet was already in existance when I went to edit it, it was giving me some display problems when doing so. I have looked at some Javascript web sites, but not being a programmer, I have little knowledge of what to use.

Any information would be appreciated. Thanks
0
Comment
Question by:nellycab
[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
  • 2
  • 2
  • 2
  • +4
10 Comments
 

Author Comment

by:nellycab
ID: 8168073
I found some instructions on DreamWeaver's site about validating multiple fields, but it says to click the <form> tage at the bottom left corner of the window, but there is no form tag.
0
 

Author Comment

by:nellycab
ID: 8168198
I found some instructions on DreamWeaver's site about validating multiple fields, but it says to click the <form> tage at the bottom left corner of the window, but there is no form tag.
0
 
LVL 1

Expert Comment

by:strangedesign
ID: 8171079
You need to highlight the form. If you can't se the tag inspector at the bottom of the screen, try clicking on the red dotted line in your page. This is the form. Once the form is selected click the (+) on the behaviors panel and choose validate form.
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 1

Expert Comment

by:strangedesign
ID: 8171083
You might try clicking inside the form first and then you should see the <form> at the bottom of your screen
0
 

Expert Comment

by:coch69
ID: 8197342
I'm using a component very useful from Yaromat, called CHECK FORM.
Have a look it is very useful and does the job !!!

http://www.yaromat.com/dw/?t=Behavior&r=forms

Easy to use
0
 

Expert Comment

by:welcht
ID: 8310159
Dreamweaver allows you to validate the form.
1- Open the Behaviors panel
2- Highlight the form (click on <form> at the bottom of page as strangedesign suggested)
3- Click on the + button in the Behaviors panel and scroll down to Validate Form

I haven't experience this creating any problems when using other jscript on a page.
0
 
LVL 2

Accepted Solution

by:
phunchak earned 450 total points
ID: 8687995
You might find it just as easy to insert your own javascript.  Here's a javascript solution that I often use.  I checks that both the name and email address are present.

---------


<script language="javascript">

var errorName= "Sorry. You must enter your name";
var errorEmail = "Sorry. You must enter an email address";

function validateForm() {

if (document.MyForm.txtName.value == "") {
    alert(errorName);
    return false;
     }

if (document.MyForm.txtEmail.value == "") {
    alert(errorEmail);
    return false;
    }
}

</script>

<form METHOD="POST" Name="MyForm" ACTION="results.htm" onSubmit="return validateForm()";>
  <input TYPE="TEXT" name="txtName" value="">
  <input TYPE="TEXT" name="txtEmail" value="">
  <input TYPE="Submit" name="submit" value="Submit">
</form>
0
 

Expert Comment

by:farai123
ID: 9004196
One problem with your script though phunchak, it doesn't validate the actual format of the email address (xx...@xx.xxx).
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 9907909
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in approximately one week.  I would appreciate any comments by the experts that would help me in making a recommendation.

It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help.jsp#hs5

zenlion420
EE Page Editor
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 10077673
Thanks for closing.

j
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

777 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