daveVk

msg:4544734 | 10:24 pm on Feb 11, 2013 (gmt 0) |
<input name="button[]" id="button[0]" type="radio" value="1" <?php echo $chk1; ?> onClick="showhideminimum(this.value);">Yes</td> and <input name="button[]" id="button[1]" type="radio" value="0" onClick="showhideminimum(this.value);" <?php echo $chk0; ?>>No</td> the 3rd call to showhideminimum not required ?
|
garwil

msg:4544834 | 6:21 am on Feb 12, 2013 (gmt 0) |
Thanks daveVk for the reply... I am having the same response with the changes you reccommend. Page opens with "No" checked and the text box and select list visible. Clecking "YES" produces no response but clicking "No" again hides just the text box and select list but leaves the labels visible.. The third call is my error :) Is one of the items I was trying and never removed before posting the code. Unfortunately removing it did not make any impact. Is probably such a small thing I know I am missing.. been at it for a solid day and just cant get the hang of it...
|
daveVk

msg:4544862 | 9:57 am on Feb 12, 2013 (gmt 0) |
You have two inputs with name="min_chrg", possible problem. Clean up and debug to showhideminimum function showhideminimum(chk) { var mc = document.getElementById('min_chrg'); var mcd = document.getElementById('min_chrg_due'); if(chk==="1") { // chk is string alert('chk 1 - from ' + mc.style.display + ',' + mcd.style.display + ' to default' ); mc.style.display=""; // set back to default mcd.style.display=""; }else{ // no need for second if alert('chk 0 - from ' + mc.style.display + ',' + mcd.style.display + ' to none' ); mc.style.display="none"; mcd.style.display="none"; } }
|
garwil

msg:4545182 | 6:57 am on Feb 13, 2013 (gmt 0) |
Thanks daveVk I got it all sorted. There were in fact two forms on my page and this is where things were going awry. I combined the two forms into one and now all works hunky-dory. Thanks again for your time...
|
|