Make value equal contents of variable, not variable name?

Problems installing or using the NOP Design Free Shopping Cart. **ARCHIVE** Please post new topics to one of the groups below.

Moderator: scott

Make value equal contents of variable, not variable name?

Postby jwparker » Fri Feb 28, 2003 12:34 am

Hope I can explain this! I want ID_NUM to hold the contents of a variable, not the name of the variable. For instance:

var id=74;

ID_NUM=id; gives me "id" on the Review Basket page, I want it to give me 74. I need a unique id for each product and I want to build it on the fly. I have as many as 200 images in a folder. I want to build an id for each of them by using the window.location and the number of the image.


You can get a feel for what I'm trying to do by looking at the code in:

http://www.jwparker.com/000/left.htm

It's the area in the function ShowPix(). They've selected a thumbnail and now they are being shown the full size image. The file name of the image was passed to ShowPix so it would know what image to display. I want that image number to be shown on the Review Cart.


Have I given enough info to understand what I'm asking?

Many thanks!
jwparker
 
Posts: 6
Joined: Sat Feb 22, 2003 8:38 pm
Location: Tampa, FL

Postby jwparker » Sat Mar 01, 2003 5:16 pm

I hope there's no penalty for answering your own question! After further review of this whole thing I realized that what I want to do has to be done with a javascript. I have it all figured out now! I sure can be dense sometimes<g>.
jwparker
 
Posts: 6
Joined: Sat Feb 22, 2003 8:38 pm
Location: Tampa, FL


Return to Installation and Setup Problems

Who is online

Users browsing this forum: No registered users and 1 guest

cron