Forum Moderators: coopster
echo "<option value = '".$record["Price"]."'>".$record["ProductName"]."\n"; Is it possible to do a wildcard character as follows:
echo "<option value = '".$record["%"]."'>".$record["ProductName"]."\n"; So instead of only haveing Price ( not a wildcard) and ProductName, it will be anything + ProductName? Am I explaining this correctly?
possibly: echo "<option value = '".$record["%ANY_RECORD_NAME"]."'>".$record["ProductName"]."\n";
So instead of only haveing Price ( not a wildcard) and ProductName, it will be anything + ProductName? Am I explaining this correctly?
possibly: echo "<option value = '".$record["%ANY_RECORD_NAME"]."'>".$record["ProductName"]."\n";
The big problem I'm having is I have a java script that is taking these values and displaying them where I specify, but I've only been able to get it work with 2 variables at once, I need 3 or more. Meaning if I choose a ProductName from the drop downlist, and want to display the Price, I would also like to be able to display the ProductDescription as well, but I am only able again to get 2 to display at once, meaning I can get ProductName and Price or ProductName and ProductDescription, NOT ProductName, Price, AND ProductDescription. ARGH I sure hope I'm explaining myself good enough.
<option value='".$row["ProductDesc"]."','".$row["Price"]."'>'".$row["Product"]."' and that didn't work either. I'm still stuck on this, unless I'm going about this all wrong?
If you really want to do it that way, store all the variables in the value field using "¦" as a seperator and then when JS gets this string from the value field, use it as a needle to split the string into an array. This is in theory as I have never done this before.
Another approach could be to hide the information you need in hidden form fields.
Hope this helps.