Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing values in javascript?

Status
Not open for further replies.

nesmar

Technical User
Oct 24, 2007
1
US
At the moment I have a site that consists of three pages. On the first page a user can select a check box to select an item to buy and a corresponding drop down menu to select a style (which effects the price). On the third page I would like to show a receipt of the items chosen, the style and price, and a total of everything bought. The downside is I do not know how to do this so any help would be appreciated.

I also would like the pictures of the items to appear twice the original size when moused over, so any help with that would be great as well.
 
Ideally, you would not use client-side JavaScript to do this. Assuming you're wanting a shopping cart system, I'd investigate a proper server-side solution to this.

You would have a form which you submit, and a server-side process to read those values (this would be written in whatever server-side scripting you prefer - e.g. ASP, JSP, PHP, etc). This process would store the data (presumably in a DB, or potentially a cookie), and then present it back on the third page.

Doing this entirely in client-side JS would be a bad move, IMHO, as ultimately, you'd still want to do things like deliver the correct price to a payment processor (this cuold easily be tweaked if using client-side JS).

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top