?
Solved

Contact Form - Field Validation

Posted on 2009-02-09
4
Medium Priority
?
292 Views
Last Modified: 2012-05-06
Hi,

I have created a contact form using HTML - I have validated the fields using the VALIDATION feature in Adobe Dreamweaver - but it doesn't appear to work.  The website seems to ignore the validation.  

I enclose the code below;-

Many thanks.

Steve.
<fieldset>
<legend>Contact Form</legend>
<p>* = Required Field</p>
<p>
  <label>Name:*</label>
  <br />
  <input name="Name" type="text" id="Name" onblur="MM_validateForm('Name','','R');return document.MM_returnValue" />
  <br />
<label>Email:*</label><br />
<input name="Email" type="text" id="Email" onblur="MM_validateForm('Email','','RisEmail');return document.MM_returnValue" />
<br />
<label>Telephone:</label><br />
<input name="Tele" type="text" id="Tele" onblur="MM_validateForm('Tele','','NisNum','Subject','','R','Message','','R');return document.MM_returnValue" />
<br />
<label>Website:</label><br />
<input name="Website" type="text" />
<br />
</fieldset>
<fieldset>
<legend>Contact Message</legend>
<label>Subject:</label>
*<br />
<input name="Subject" type="text" id="Subject" />
<br />
<label>Message:</label>
*<br />
<textarea name="Message" cols="50" rows="10" id="Message"></textarea>
</p>
  
  <input type="submit" name="Submit" id="Submit" value="Submit" onblur="MM_validateForm('Name','','R','Email','','RisEmail','Tele','','NisNum','Subject','','R','Message','','R');return document.MM_returnValue"/>
 </fieldset>

Open in new window

0
Comment
Question by:SGARLINGE
  • 3
4 Comments
 
LVL 3

Expert Comment

by:lazypeople
ID: 23598318
Hey i see that you are calling javascript functions but i dont see any attached javascript functions to call. If this is the full document the reason it isnt working is because there are no functions to call.

Thanks
Ben
0
 

Author Comment

by:SGARLINGE
ID: 23598830
Oh I see.  I just did what Adobe Dreamweaver said to do- which was click on my field, click on Validate form and select paramaters.  Surely it would insert the script if its a feature of the program.

What script would I need ?
0
 
LVL 3

Accepted Solution

by:
lazypeople earned 1000 total points
ID: 23599158
Normally it would create a link to a java script file similar to this:
<script type="text/javascript" src="./init.js"></script>

or it will look like a big chunk of code like this:
<script type="text/javascript" src="Site/javascript/ddaccordion.js">

//lots of code would go in here

</script>
0
 
LVL 3

Expert Comment

by:lazypeople
ID: 23599169
It should be in the original code or it is attached further up in your code. as i cannot see any opening html tags

thanks
ben
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 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