Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Validate form code needed
Old 06-10-2009, 06:01 AM Validate form code needed
Average Talker

Posts: 15
Trades: 0
I'm struggling to get my code right in order to validate a form. I have a checkbox which when checked accepts terms and conditions, i don't want the form to be able to be submitted without the button being checked. If i put a link to the page and include the code could someone please tell me exaclty what code i have to have and where. Thanks

http://www.elitetradesmen.com/searchtrades1.html

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Elite Tradesmen of Southport &amp; surrounding areas</title>
<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
</head>
<body>
<div id="wrapper">
 <h1>Elite tradesmen</h1>
 <div id="nav">
  <a href="index.html">Home</a>
  <a href="searchtrades1.html" class="selected">Submit Work</a>
  <a href="policies2.html">Our Policies</a>
  <a href="areas1.html">Areas</a>
  <a href="contact2.html">Contact Us</a>
</div>
 <div id="body">
  <div id="body-top">
   <div id="body-top-2"></div>
   <div id="body-bot">
<div id="welcome">
     <img src="http://www.webmaster-talk.com/images/pic_1.jpg" width="231" height="301" alt="Pic 1" />
      <h2>Submit your job</h2>
     <p>We will always post all received jobs on the website within 24 hours. If you would like someone to visit you in person to take details of the work please use the form on this page.</p>
     <p>&nbsp;</p>
     <p>Please read our policies page for payment terms, service agreements etc.</p>
<p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
<p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
     <p>&nbsp;</p>
<p>&nbsp;</p>
     <p>&nbsp;</p>
    <p>&nbsp;</p>
     <p>&nbsp;<img src="http://www.webmaster-talk.com/images/logo12.jpg" alt="" width="178" height="138" /></p>
</div>
    <div id="content">
     <img src="http://www.webmaster-talk.com/images/page images/submit.jpg" width="109" height="109" alt="Pic 2" class="left" />
      <h2>Submit your work here</h2>
      <p>To request quotes from our tradesmen simply fill in the form below.</p>
      <p>Your job will then be posted on our site and alerts sent to all tradesmen in the service concerned.</p>
      <p>Quotes will be sent to you as and when we receive them. You will be sent portfolio information for each tradesman with every quote received.</p>
      <p>When you have decided which tradesmen to use we will draw up a plan of works which will detail work to be completed, agreed amount, date to commence and complete work. This plan of works will be signed by both customer and tradesman. At this time 10% of the total quote will be paid to Elite Tradesmen by the customer.</p>
      <p>When the work is completed the customer will sign the plan of work to confirm that the work has been completed to your satisfaction. Once the work has been signed off payment will be made in full from the customer to the tradesman.</p>
      <p>At this point we ask that you leave us some feedback in relation to the service you received both from us and your tradesman.</p>
      <p>&nbsp;</p>
      <p>To submit your job please complete this form:</p>
      <p>&nbsp;</p>
      <p>Name: 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <elephone>
  Telephone:<br />
  <input type="text" name="FirstName" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="LastName" />
<br />
                  </p>
                  <p>Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prefered contact method:<br />
                    <input type="text" name="Tel" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;
  <input type="text" name="EmailFrom" />
  <br />
                  </p>
                  <p>Address:<br />
                    <textarea name="Basicjobdetails" cols="35" rows="5"></textarea>
                  </p>
                  <p>Trade required: 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
 <input type="text" name="trade" id="trade">
&nbsp;<br />
                  </p>
                  <p>Preferred start date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Preferred completion date:<br />
                    <input type="text" name="Tel2" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;
  <input type="text" name="EmailFrom2" />
  <br />
                  </p>
                  <p>Details of the work you would like completed                  :<br />
                    <textarea name="Basicjobdetails2" cols="35" rows="5"></textarea>
                  </p>
                  <div align="justify">
                    <input type="radio" onclick="check(this)" name="agree"> 
                    I agree to all the terms and conditions shown under 'Our Policies' </div>
                  <p>
                    <input type="submit" name="submit2" value="Submit" />
                  </p>
                  <div class="fineline"></div>
                  <p>&nbsp; </p>
        </div>
    <div class="clear"></div>
   </div>
  </div>
 </div>
 <div id="footer">
  <p>Copyright © 2009, Elite Tradesmen. All rights reserved</p>
 </div>
</div>
</body>
</html>

Last edited by willcode4beer; 06-10-2009 at 11:57 AM..
speed1972 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-10-2009, 09:18 AM Re: Validate form code needed
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Since you don't seem to have any idea where to begin, I suggest you use a well-documented API which will do this for you. Here is one I dug up for you: http://bassistance.de/jquery-plugins...in-validation/ It requires jQuery.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Validate form code needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29855 seconds with 12 queries