Page 1 of 1

Linked Dropbox-Radio Button Duo

Posted: Mon Jun 29, 2009 4:42 pm
by lmg
I was just wondering if it is possible to populate a dropbox once a radio button is pushed with php or if I have to use Javascript.

Basically what I have are two questions - the first is a question with two options of which the user can select one. Based on this answer, the dropbox in the second question should populate accordingly.

I don't have any working code yet, but here is the outline:

Code: Select all

<form method="post" action="get_aPie.php">
<a href="session.php">Return to Main Menu</a>
<br>
<br>
 
<img src="img.bmp" alt="image" align="right" width=450 height=250 \>
 
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div style="text-align:center">
<h4>Please select the number of pies you wish to view:</h4><br>
<input type="radio" name="group1" value="1"><span title="Results from a self-audit.">&nbsp;&nbsp;One</span><br>
<input type="radio" name="group1" value="2"><span title="Results from an audit with both self and independent audit data.">&nbsp;&nbsp;Two</span><br>
<br>
 
<h4>Please select the audit number for which you would like to view the pie(s):</h4>
<select>
<!--TODO: POPULATE THIS WITH ALL OF THE VALID ENTRIES FROM THE DB -->
</select>
<br clear="all">
 
<input type="submit" id="submit" value="OK">
 
</div>
Let me know if I have been unclear.

Re: Linked Dropbox-Radio Button Duo

Posted: Mon Jun 29, 2009 4:45 pm
by kalebaustin
I was just wondering if it is possible to populate a dropbox once a radio button is pushed with php or if I have to use Javascript.
That'd be javascript.
Php is serverside, javascript is client-side.

Re: Linked Dropbox-Radio Button Duo

Posted: Mon Jun 29, 2009 4:52 pm
by lmg
Thanks kale.