Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

value of name/value pair to provided by a variable?

Posted on 2003-02-28
6
Medium Priority
?
175 Views
Last Modified: 2013-12-25
I have a form that sends info to a shopping cart.  One of the items sent is a product ID, it's called ID_NUM (curiously enough).  Right now it's set with a code along the lines of:

      <input type=hidden name="ID_NUM" value="mary 28">

I need to be able to set the value on the fly by equating it to a variable that's unique to the product.  I don't want to have page after page of html with the only difference on any of them being a few characters that id the product.

One of the things passed to this page is a unique id number that's in a variable name pix .  I tried:

      <input type=hidden name="ID_NUM" value=pix>

All I get passed to the cgi is the string "pix"!

You can see the actual code at:

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

Any ideas?
 



0
Comment
Question by:jwparker110498
  • 2
4 Comments
 
LVL 7

Expert Comment

by:markhoy
ID: 8047767
what hosting platform are you using? perl or asp? is the shopping cart perl, asp or javascript?
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8047774
Looks like you use .js so I'd delete this question aND repost in the javscript forum.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 8049118
either you need to create a uniq HTML for each value, or use <SELECT> .. <OPTION> instead of <INPUT>

JavaScript (or any other browser scripting) only works if the user allows it.
0
 
LVL 2

Assisted Solution

by:TS020
TS020 earned 200 total points
ID: 9051854
Actually, what it appears that you need to do is have a CGI create the page with the forms that you are currently using, where ID_NUM is passed to the CGI through POST or GET, and thus, you would use that information to fill the hidden data field.  I have to do this all the time.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question