Simple JavaScript & XML cart

Here is a simple JavaScript & XML shopping cart I made. Product data is stored in a single XML file, which is referenced by the rest of the web site’s JavaScript code.

JavaScript makes the application pretty sweet since all of the processing is dependent on the user’s computer; no need to worry about server resources. It also helps to make a smooth experience by providing instant feedback to users’ actions in areas like the view cart and checkout pages.

Ultimately, it shouldn’t be relied on since JavaScript can simply be disabled and it cannot perform true form validation. However, portions of it could be incorporated into an existing server-side shopping cart to improve its interface and usability.

Notes

The web site does not collect/store any data, so feel free to play around with it.

3 Comments »

  1. Good morning,

    I’ve downloaded jsCart to play around with but it won’t allow me to POST. Any idea why?

    Error message I get:
    The requested method POST is not allowed for the URL /jscart/cart.htm

    Thanks for your help.

    Patrick

    [Reply]

    I actually had the same problem when I uploaded this to my server. Making HTML files read as PHP files did the trick, but I couldn’t narrow down exactly what the problem was.

    Are you running this off a server (web or localhost) or just off your file system? Also, what browser are you using?

    [Reply]

    I’m running it from a localhost server.

    I guess I could rename all files and all occurrences to PHP.

    [Reply]

    Comment by Patrick — November 13th, 2008 @ 4:27 pm

    Comment by Dan — November 13th, 2008 @ 3:45 pm

    Comment by Patrick — November 13, 2008 @ 3:37 pm

Comments RSS feed.

Leave a comment