Indeed your assumption holds no water. Funnily enough, yes I am familiar with php and have done a lot of work with it, hense why I posted in a php code forum. My question was based on HTML, meaning I need the values of a selected option to reflect the value of a subsequent variable.
Although I posted the script in the form of HTML, this was for simplicity's sake; the corresponding php would be
Code: Select all
<?php
echo ("
<select name=\"$option\" id=\"$option\">
<option value=\"option1\">Some Text</option>
<option value=\"option2\">Some Text</option>
<option value=\"option3\">Some Text</option>
</select>");
?>
Hense the "$option" as the name.
What I am trying to do is parse the details from the $option to reflect another object's value.
I don't mind using Javascript, I just find it tedious if I have to build a script full of arrays.
An IF statement implementing;
Code: Select all
if(document.formname.option.value == "option1"){
document.formname.type.value = "This"
}
Else { document.formname.type.value = "That"}
Would suffice, but they don't ever seem to want to work for me.
I am grateful for your reply, and you have sparked a lightbulb in the back of my mind if I can't get an IF statment that works in realtime.
But please, just because you have over 2000 posts, don't condescend me, or my programming competence.