View Full Version : Need some help with a form and the mailto action. (links to code included)

08-07-2002, 07:37 AM

I am trying to get my website ready to upload to the correct URL, however I am having some problems finishing it off.

I am using a Javascript shopping cart to control the shopping features of the site, however the final form before order submission retreives data from previous html pages and loads the data into a table. Under this preloaded table I have a form which needs to be filled out.

The problem is that whenever I hit the submit button, it submits the part of the form that needs to be filled out (shipping and Credit Card details) and not the actual order (pre-loaded from other pages within the site)

This is the part of the code that controls the form and mailto pieces:

<hr size="1" color="000000">
<B><P>The following items are in your cart:</B>


<form action="mailto:reptilemart@optusnet.com.au?subject=CustomerOrder" method="POST" enctype="Text/Plain" name="Customer Order" target=">

Any help with the website would be greatly appreciated.
You can find the testsite at:


p.s. Don't worry I plan on adding SSL to the submission page.

Thanks in advance,


08-07-2002, 04:00 PM
Well, a form wont submit any data that is not withing valid form elements. You need to stuff your order data into a hidden input that that it is sent with the form. How is the order data stored? Cookie? The page is obviously reading the data for display, you will just need to figure out how to parse it into a usable format. I'd help you with this but it is a bit too time consuming for me now....best of luck!

08-08-2002, 05:37 AM
It uses cookies to temporarily store all of the order data. I don't know much about JS (excellent with html and ok with java), but I have tried about 4 different shopping cart systems. The first three were good but tricky, and the JS cart is the only one that I can kind of understand. I am so close (my index finger and thumb are almost touching) to getting it completed, but I just can't get it to send all the data. I tried to put the
script in-between the form tags, but it doesn't work. I was wondering if another option would be to send the whole page as a html email to myself when the submit button is pressed.

Anyway, any help would be appreciated. I have the feeling that it isn't that hard to fix (to experienced JS ppl) however with my level of kowledge in JS, it seems impossible.

Thanks in advance.