TruerWords Logo
Google
 
Web www.truerwords.net

Search TruerWords

Welcome
Sign Up  Log On

“Firefox? Isn't That a Movie?”

From: Seth Dillingham In Response To: Top of Thread.  
Date Posted: Wednesday, April 25, 2007 3:11:31 PM Replies: 1
   
Enclosures: None.

One of my clients has recently signed up for an online shopping cart system to work with his catalog (which is based on Conversant).

When a customer buys something through this shopping cart system, they're shown a confirmation page with a link back to a specific page on the vendor's site. That's totally standard.

The link appears to use JavaScript to submit a form which POSTs the sale's data (minus the truly private info like credit card number) back to a page on the vendor's site. Still pretty common (except their implementation doesn't actually work).

They claim that it only works in IE. Not in Firefox, not in Safari, not in Opera. Why worry about those, they're just a small percentage of the marketplace, right?

I'm sorry, but those people are morons.

Without even testing it, I can tell you that they're wrong: it doesn't work in ANY browser, not even IE. How do I know? The link just runs the script, and the script just causes the browser to navigate to the vendor's thankyou page: it never does anything with the form at all.

The form is all hidden fields, looking something like this:

<form action="url/of/thank-you/page" name="postData">
<input type="hidden" name="firstName" value="Seth" />
etc., etc., etc.

The form's action is pointing to the correct URL... but the form is never used. The script looks like this:

function submitForm()
{
window.location.href="url/of/thank-you/page";
return true;
}

If you understood the above, then you know how easy it would be to fix:

function submitForm()
{
document.forms.postData.submit();
return true;
}

Sigh. (Even easier: do away with the javascript entirely, and replace the link with an actual submit button.)


Discussion Thread:
  • Re: Firefox? Isn't That a Movie? (by Seth Dillingham at 4/25/2007)

    On 4/25/2007, Seth Dillingham said: >However, the link uses JavaScript to submit a form which POSTs

Trackbacks:

There are no trackbacks.


Until August 31
My Amazon sales
benefit the PMC

Homepage Links

Apr 1 - Aug 31
Ad revenue
benefits the PMC


TruerWords
is Seth Dillingham's
personal web site.
Truer words were never spoken.