Solved

My form is not valadating

Posted on 2011-02-20
4
343 Views
Last Modified: 2012-05-11
I am trying to validate my form for some reason i just cant get it right form.html view.js
0
Comment
Question by:imagekrazy
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 34939915
chaneg the name of yoru submit button (for example Submit or mysubmit but not submit) :
<input id="saveForm" class="button_text" type="submit" name="mysubmit" value="Submit" />

Open in new window

0
 

Author Comment

by:imagekrazy
ID: 34940014
that didn't work
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 34940286
>i just cant get it right
>that didn't work

could you give more information about what you need and how you test it ?

Else return true if everything is alright :

else {
				return true;
			}

Open in new window


function applyOnSubmitToForms()
{
	elementsForms = document.getElementsByTagName("form"); 
	for (var intCounter = 0; intCounter < elementsForms.length; intCounter++) 
	{ 
		elementsForms[intCounter].onsubmit = function ()
		{
			if (!validateForms())
			{
				alert("please fill");
				return false;
			}
			else {
				return true;
			}
		}
	} 
}

Open in new window

0
 

Author Comment

by:imagekrazy
ID: 34943018
almost  there, now I added what you told me to, and it's kinda working,  When i preview it my my browser and if i fill out the form completely, its now telling me to fill  everything,  even when i filled out everything?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

713 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