• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

html, webform question.

<form name="form2" method="post" action="https://">
<font size="5">Size: </font>
<input type=hidden name=id value="dv">
<select name="select">
<option value="500-3033">2114</option>
<option value="500-3032">2117</option>
</select>
<font size="5">Quantity Desired:</font> <input type=text size=2 name=select> <input type=SUBMIT NAME=SUBMIT value="Buy Me"></td>
</form>

<input type=text size=2 name=select>, name needs to = the option value of the product the person selects from the box such as the 500-3033, how do I go about doing that?
 
Why do you need to do that? You can only select one value from the select box, it's not like you need to figure out which selection to associate the text box with.
 
Originally posted by: Cyberkiller6
I wrote the script to send data to a shopping cart script, and it uses the name for the product id to add the item to the cart.

Then make your script get the value from the select box and use that as the name for the text field. Otherwise you're going to have to write javascript to do it.
 
I can't change the cart script and I tried using javascript isn't working either.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<SCRIPT LANGUAGE="JavaScript"><!--
function updateTextField() {
document.form3.result.value =
document.form1.select1.options[document.form1.select1.selectedIndex].value
}
//--></SCRIPT>
</head>

<body>
<form name="form1" method="post" action="https">
<font size="5">Size: </font>
<input type=hidden name=id value="dv">
<select name="select1" onChange="updateTextField()">
<option value="500-3033">2114</option>
<option value="500-3032">2117</option>
</select>
<font size="5">Quantity Desired:</font> <input type=text size=2 name=result> <input type=SUBMIT NAME=SUBMIT value="Buy Me"></td>
</form>
</body>
</html>
 
Back
Top