> I'm so sorry, but I'm pulling my hair out on this _javascript_
> issue and I can't get any help.  
>
> I have this credit card code that checks values.  The code
> throws an alert error, but when I click ok on the alert
> popup, the page process instead of allowing me to fix the
> error and process it again.
>
> I'm using document.ThisForm.submit(); to process the page,
> look for this text below.

I just briefly read through the code, so I may not understand exactly which
forms and functions are doing what.

However, usually when using _javascript_ form validation, you want to write a
validation function which simply returns true or false. Then, within your
form's onsubmit event handler, you return the value returned by that
function:

<script>
function checkme() {
if (ok) {
return true;
} else {
return false;
}
}
</script>

<form ... checkme();"> ...

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to