I would like to create a page which has two radio buttons.(which is fairly easy ? ) But I would like to get three text fields when I checked on one of the buttons or two when I click the other.
Any suggestions/ideas how to build on would be of great help.
I would like to create a page which has two radio buttons.(which is fairly easy ? ) But I would like to get three text fields when I checked on one of the buttons or two when I click the other.
Any suggestions/ideas how to build on would be of great help.
Thanks
Revz?[/QUOTE]
Which 2 text fields and which 3 text fields (of how many text fields total)?
What do you wish to do with the values in the text fields once acquired?
For an Example,I have two radio buttons like Exercise and Pilates.If I selected Exercise I should see three text-fields each should take input and has to update the database behind. And if I selected Pilates then it should show two text fields.
As of now, I have just created a web-page with just two radio-buttons. Any suggestions on how to hide/show or toggle would be of great help.
Thanks for pointing me to that!! That was helpful!! butI get the result in a diferent way.
Instead of masking the third text-filed, it disables the the check-boxes that I click.
Here is wat I have done. <i> </i>print $dw->header({'menu' => 1, 'script' =>"function toggle(value){ for (var i= 1;i<=2;i++){document.getElementById('grp'+i).style.display = 'none';} var temp = info.split(',') for (var i = 0;i<temp.length;i++) {document.getElementById('grp'+tmp[i]).style.display = 'block';}}"});
<i> </i>print $cgi->th('Select Assay to register');
#This is the options that I should select any one of the two. If I selected the #Taqman then I should see just the grp 1, and grp2 but if I select the other #one then it should show all the three grps print $cgi->td($cgi->checkbox(-name=>'taqman', -value=>'1,2', -label=>'TaqMan', -id=>'taq', -onclick=>'toggle(this.value)'));