How To Show Hidden Data Types In Php Loop?
Is there a way to toggle show/hide for data that is dynamically populated in a php loop? I've been around and around trying to figure out the best way to do this, but I just don't
Solution 1:
Something like this? demo
example:<br /><buttononClick="$('.hide').toggle();">click me</button><table><trstyle="display:none;"class="hide"><tdcolspan="3">abstract text</td></tr><trstyle="display:none;"class="hide"><tdcolspan="3"><formaction="assign_session.php"method="post"id="form"><labelfor="abstract_category">Assign Session:</label><inputtype="hidden"name="abstract_id"value="'. $row['abstract_id'] .'" /><inputtype="radio"name="abstract_category"value="session1" />Session One
<inputtype="radio"name="abstract_category"value="session2" />Session Two
<inputtype="radio"name="abstract_category"value="notapplicable" />Not Applicable
<buttontype="submit"formaction="assign_session.php">Assign</button></label></form></td></tr></table>
I use jquery to toggle (show/hide) the elements you need to show/hide.
Moreover you have several errors on this code (like you are not closing the first td, not using in the right way labels).
Solution 2:
You can use jquery to do something like this
Let's say you click Show
$('#my_button').click(function(){
$('#hidden_div').val('hidden',false);});
or for CSS
$('#my_button').click(function(){
$('#hidden_div').css('display','all');});
Post a Comment for "How To Show Hidden Data Types In Php Loop?"