Forum Moderators: open
<SCRIPT LANGUAGE="JavaScript">
function showDescription(sel, productdesc, price, productname){
var opt = sel.options;
if(opt[sel.selectedIndex].value == "productname"){
productname.value = "product name";
productdesc.value = "product description";
price.value = "product price";
}else{
productname.value = opt[sel.selectedIndex].text;
var ary = opt[sel.selectedIndex].value.split("¦");
productdesc.value = ary[0];
price.value = ary[1];
}
return true;
}
</script> [edited by: RogueDogg at 11:34 pm (utc) on July 12, 2006]
Productname is in a drop down menu -- select a product then it displays the productdesc in a textarea and also the price in a textbox. When I submit those to invoice.php and echo the values $productname, $productdesc, $price it's not displaying $productname ( productname has no properties according to FireFox console ) and it's displaying $productdesc ¦ $price -- $productdesc....so basically displaying the $productdesc twice. I can give you working solutions via PM if you like.
[edited by: RogueDogg at 12:28 am (utc) on July 13, 2006]