Tag Cloud for this topic:
account action added alert blank button cart changed check code customer disabled don due ejejc event fact false field form forum function google included link linked number operation page pay payment post product return running scenario sending site submit text triggers type valid value variant verify
I have recently set up a product with variants that allows us to have a customer enter their account number before sending us a payment. We can then post the payment to the proper account, since we have the account number. now I want to provide some basic validation to verify that the customer has not left the Account number variant text field blank.
Any ideas on what I am missing here?
I changed [code]<form action="https://www.e-junkie.com/ecom/gb.php......accept-charset="UTF-8">"[/code] to [code]"<form name="pay_online" action="https://www.e-junkie.com/ecom/gb.php......accept-charset="UTF-8" onsubmit="return validate_form ( );">"[/code]
and I added this script:
function validate_form ( )
valid = true;
if ( document.pay_online.os0.value == "" )
alert ( "Please provide your account number." );
valid = false;
POSTED ON: September 17, 2008 @ 13:30 GMT -7
The form submit is a "backup" scenario for when the user has JS disabled or if you don't have box.js included in your page.
So, the primart piece of code which triggers the cart is the EJEJC_lc function which is called by the onClick event of the button included in the form.
Check out the site mentioned at http://www.e-junkie.com/bb/topic/2793#post7437 .. they seem to have done that very well.
POSTED ON: September 18, 2008 @ 13:58 GMT -7
You must be logged in to make a post. Please click here to login.