RogueDogg1
Programmer
Code:
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{
var ary = opt[sel.selectedIndex].value.split("|");
productdesc.value = ary[0];
price.value = ary[1];
productname.value = ary[2];
}
return true;
}
So basically what this is doing is:
I have made a db query to get the (productname, productdesc, price) so I put the productname in a drop down menu from Dreamweaver and when you select a productname it will display the productdesc in a textarea and the price in a textbox.
Now that is working just fine, the problem is when I submit those values in the form and echo them the $productname doesn't display, it comes ends up displaying the productdesc | price -- productdesc again. So where might I be going wrong? I have a live working example if someone would like further testing just let me know. Thanks in advance for any help that would be given.