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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 05-21-2005, 05:19 AM Need Simple Code
Experienced Talker

Posts: 46
Trades: 0
I cant belive i forgot this but how do i make it so that the user HAS to fill out all the feilds in a Form before clicking Submit?
__________________

Please login or register to view this content. Registration is FREE
- Got a problem? Let us help!
----------------------------
streek is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-21-2005, 07:43 AM
Junior Talker

Posts: 4
Trades: 0
It's called a Java Script "form validator". There is one at: http://www.javascript-coder.com/html...lidation.phtml - There are others.. just google for it and more willpop up.

wbrother is offline
Reply With Quote
View Public Profile
 
Old 05-23-2005, 05:35 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
you can also do some jazzy stuff like this,

Code:
<script language="JavaScript" type="text/javascript">

//"Accept terms" form submission- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var checkobj;

function agreesubmit(el){
	checkobj=el;
	if (document.all||document.getElementById){
		for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
		var tempobj=checkobj.form.elements[i]
		if(tempobj.type.toLowerCase()=="submit")
		tempobj.disabled=!checkobj.checked
		}
	}
}

</script>

<form>
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)" >Yes I have read and agreed to abide by this website's Terms & Conditions
<br />
<input name="mode" type="submit" value="Go" disabled/>
</form>
<script language="JavaScript">
   document.forms.agreeform.agreecheck.checked=false
</script>
Runs nice, only enables the submit button once the check box is ticked. Can be applied to any form element.

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to Need Simple Code
 

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.43064 seconds with 12 queries