0

I have a form and at the bottom it asks if you want a shirt? it gives you a yes and a no radio button to choose.

If the user selects yes I want a jump menu to display with shirt sizes, if they select no I want it to disappear.
How would I do that?

Include Shirt: <br/>
Yes:<input type="radio" name="shirt" value="shirt_yes"/>
 No:<input type="radio" name="shirt" value="shirt_no"/>
<br/>
Size:
<select name="size" id="size" onChange="MM_jumpMenu('parent',this,0)">
  <option>medium</option>
  <option>large</option>
  <option>XL</option>
  <option>XXL</option>
</select>
<br/>
<input type="submit" value="Submit order" />
<br />
</form>

Now if that is going to require something like ajax or javascript, which I cannot code. If there a way in my submit php script to determine the different and post the size if they selected yes to the email order form?

Thanks

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by bjeffries
0
<script type="text/javascript">
function jfunc(x){

if(x=="shirt_yes"){
document.getElementById("jdiv").style.display="block";
}else{
document.getElementById("jdiv").style.display="none";
}

}
</script>
Include Shirt: <br/>
Yes:<input type="radio" name="shirt" onclick="jfunc(this.value)" value="shirt_yes"/>
 No:<input type="radio" name="shirt" onclick="jfunc(this.value)" value="shirt_no"/>
<br/>
<div id="jdiv" style="display:none;">
Size:
<select name="size" id="size" onChange="MM_jumpMenu('parent',this,0)">
  <option>medium</option>
  <option>large</option>
  <option>XL</option>
  <option>XXL</option>
</select>
<br/>
<input type="submit" value="Submit order" />
<br />
</div>
</form>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.