Print Page | Close Window

Is there a Java doctor in the house?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5313
Printed Date: 29 March 2026 at 5:18am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Is there a Java doctor in the house?
Posted By: betheball
Subject: Is there a Java doctor in the house?
Date Posted: 26 August 2003 at 8:12pm
If there happens to be a javascript expert, could you please look at this form and tell me why my jscript form validation script is not working.  Virtually every field is supposed to be a required field, but the form will submit blank.  Here is the link: http://www.axis-one.com/NewWeb/Register2.asp - http://www.axis-one.com/NewWeb/Register2.asp



Replies:
Posted By: KCWebMonkey
Date Posted: 26 August 2003 at 8:21pm

change this: 

<form method="POST" action="Register4.asp" onSubmit="return Validator(theForm)" language="Javascript">

to this:

<form method="POST" action="Register4.asp" onSubmit="return Validator(this);" language="Javascript">



Posted By: betheball
Date Posted: 26 August 2003 at 9:13pm
Why didn't I post this question 6 hours ago?  Maybe then my head wouldn't be throbbing like it is right now. Why doesn't the name in the() have to be the same in the name of the function and when the function is called after the onSubmit action???  It seemed to me if the function was declared like this:

function Validator(theForm)

Then then when called with the onSubmit is would also be

onSubmit="return Validator(theForm)"

I am so confused. But thanks for the answer



Posted By: KCWebMonkey
Date Posted: 26 August 2003 at 10:35pm
don't know for sure, but i do know that when you put Validator(this) in it tells the script to check "this" form...


Posted By: Diep-Vriezer
Date Posted: 04 September 2003 at 2:59pm
Or, give the form a name, like name="theForm".

-------------
Gone..



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net