marukochan Posted February 14, 2007 Share Posted February 14, 2007 OK ... I hope I can explain this well. I have a list of radio button from which the user could choose what records to view all projects by status - (option : bidding or awarded) by date .... If the user select 'all project' it would be no problem because the button will be checked. But, if the user wants to view projects 'by status' BUT did not click at the button but instead straight away selects bidding or awarded how do I make the 'by status' radio button checked? In other words, how do I automatically checked the radio button when I made a selection from an option at that particular radio button? Hope my explanation is understood. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted February 14, 2007 Share Posted February 14, 2007 place the input tag completely within a label tag - and keep the text inside teh label too. Quote Link to comment Share on other sites More sharing options...
marukochan Posted February 14, 2007 Author Share Posted February 14, 2007 ToonMariner ...... thanks for replying but I don't quite understand where to put the input tag. Sorry for being 'slow'. Here's my code form action="project_db.php" method="get"> <table width="606" border="0"> <tr> <td width="32"><div align="center">1.</div></td> <td width="564"><strong>View</strong></td> </tr> <tr> <td> <div align="center"> <input type="radio" name="option" value="all"> </div></td> <td><em>All Projects </em></td> </tr> <tr> <td> <div align="center"> <input type="radio" name="option" value="status"> </div></td> <td><em>By Status : <select name="status"><option value="">--Select--</option> <option>Bidding</option> <option>Awarded</option></select></em></td> </tr> .... .... .... Hope you could point where I should place the input tag. Thanks Quote Link to comment Share on other sites More sharing options...
benjaminbeazy Posted February 14, 2007 Share Posted February 14, 2007 form action="project_db.php" method="get"> <table width="606" border="0"> <tr> <td width="32"><div align="center">1.</div></td> <td width="564"><strong>View</strong></td> </tr> <tr> <td> <div align="center"> <input type="radio" name="option" value="all"> </div></td> <td><em>All Projects </em></td> </tr> <tr> <td> <div align="center"> <input type="radio" name="option" value="status" id="status"> </div></td> <td><label for="status"><em>By Status : <select name="status"><option value="">--Select--</option> <option>Bidding</option> <option>Awarded</option></select></em></label></td> </tr> Quote Link to comment Share on other sites More sharing options...
marukochan Posted February 14, 2007 Author Share Posted February 14, 2007 Thanks. Already working. Quote Link to comment Share on other sites More sharing options...
benjaminbeazy Posted February 14, 2007 Share Posted February 14, 2007 yay! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.