Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q169

Feedback on: irt.org FAQ Knowledge Base Q169

Sent by Natalia on July 06, 2000 at 14:54:08: - feedback #1461

Worth:
Not worth reading

Comments:
the code is messed up...not working!
The name "myObject" should be "myForm"...but even after corrections - still not working!
Not submitting form.......


Sent by Mark McVicker on September 14, 2000 at 22:57:56: - feedback #1755

Worth:
Very worth reading

Length:
Too short

Technical:
Just right

Comments:
irt.org rocks my world. This particular article was *the* key to my completing a desired task.

Although, being the JavaScript novice that I am, it took me a while to realize that "myobject" was referring to the name of the object I wanted to validate (sounds silly in hindsight).

This article, along w/ another (forgot the #) and comp.lang.javascript were very helpful.

Keep it up.


Sent by greg robinson on January 11, 2001 at 15:52:47: - feedback #2231

Worth:
Very worth reading

Comments:
Just wanted to say that the code worked great. Thanx for the help.


Sent by Christian Denny Petersen on May 11, 2001 at 07:05:50: - feedback #2719

Comments:
I did this...see if you can use it for something...
<html>
<head>
<title>Validator</title>
<script language="JavaScript">

function validateForm(validator)
{
for (var i = 0; i < validator.elements.length; i++)
{
if (validator.elements[i].value == "")
{
alert("Fill out ALL fields please.")
return false
}
}
return true
}

function formValidated(validator)
{
if (validateForm(validator))
validator.submit()
}
</head>
<body>
<form name="validator" onSubmit="return validateForm(validator)">
Please enter all requested information:
<br>
First name:<input type="text" name="firstname"><br>
Last name:<input type="text" name="lastname"><br>
Rank:<input type="text" name="rank"><br>
Serial Number:<input type="text" name="serialnumber"><br>

<a style="cursor:hand;text-decoration:underline;color:blue;" onClick="formValidated(validator)">Submit</a>
<input type="submit">
</form>
</body>
</html>


©2018 Martin Webb