Re: Credit card page processing before error check

2004-08-31 Thread Adam Haskell
Ok Without reading that whole page. How are you running these
_javascript_s? On form submit or with a button's onclick event? If you
are running them onsubmit you are not returning false from what I
could gather
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Credit card page processing before error check

2004-08-31 Thread coldfusion . developer
I'm running it from ...
input type=Submit value=Submit Order >

Ok Without reading that whole page. How are you running these
_javascript_s? On form submit or with a button's onclick event? If you
are running them onsubmit you are not returning false from what I
could gather
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Credit card page processing before error check

2004-08-31 Thread Dave Watts
 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]




RE: Credit card page processing before error check

2004-08-31 Thread Ewok
This bit is always gonna return true, maybe that’s the problem…


if (!this.isExpiryDate())
return false;

return true;



also try 

 checkit();return false;”

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]