Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Required/Validate fields using DreamWeaver

Posted on 2003-03-19
10
Medium Priority
?
270 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
  • 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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

571 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