Our site has a product where the customer must enter several bits of info in textboxes before clicking "add to cart" (single add to cart button for the whole page, as each attribute is linked to a sub-"product".) The product is a personalised canvas print so there are many attributes and pieces of info (file upload, colour preferences etc.) to enter.
I'd like to use JavaScript/PHP to submit the info to our server as the product is added to the cart. The scripting is easy, I've just used a few fieldnames as variables. I tested it all out in Dreamweaver, works fine...
... but the problem is, in Actinic I can't have a submit button on the page without it automatically running the Perl script assuming it is the Add To Cart button. I've tried adding: onClick="javascript: submitAll()" to the 'single add to cart button' code but it seems to get ignored. It just adds to cart and totally ignores the JavaScript.
Ideally I'd like to have a button that executes one or more JS functions AND THEN adds the product to the cart, all in one click. But I'd settle for a submit button alongside an add to cart button if the former cannot be done.
Any ideas?
Matt.
I'd like to use JavaScript/PHP to submit the info to our server as the product is added to the cart. The scripting is easy, I've just used a few fieldnames as variables. I tested it all out in Dreamweaver, works fine...
... but the problem is, in Actinic I can't have a submit button on the page without it automatically running the Perl script assuming it is the Add To Cart button. I've tried adding: onClick="javascript: submitAll()" to the 'single add to cart button' code but it seems to get ignored. It just adds to cart and totally ignores the JavaScript.
Ideally I'd like to have a button that executes one or more JS functions AND THEN adds the product to the cart, all in one click. But I'd settle for a submit button alongside an add to cart button if the former cannot be done.
Any ideas?
Matt.
Comment