Linked Dropbox-Radio Button Duo

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lmg
Forum Commoner
Posts: 34
Joined: Tue May 26, 2009 10:11 am

Linked Dropbox-Radio Button Duo

Post 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.
kalebaustin
Forum Newbie
Posts: 12
Joined: Mon Nov 19, 2007 11:28 am

Re: Linked Dropbox-Radio Button Duo

Post 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.
lmg
Forum Commoner
Posts: 34
Joined: Tue May 26, 2009 10:11 am

Re: Linked Dropbox-Radio Button Duo

Post by lmg »

Thanks kale.
Post Reply