daveVk

msg:4265099 | 10:49 am on Feb 10, 2011 (gmt 0) |
function onChange(obj,show){ var el = document.getElementById("otherOpt"); if (obj.checked==show) { el.style.display=''; } // Show Options else { el.style.display='none'; } } on public onchange="onChange(this,true)" on private onchange="onChange(this,false)" or replace two radios with single checkbox ?
|
weddingm

msg:4265455 | 1:08 am on Feb 11, 2011 (gmt 0) |
thanks davevk...got it to work the way i wanted.
|
weddingm

msg:4266690 | 5:57 am on Feb 14, 2011 (gmt 0) |
I got it to work at time of order but not at time of edit....any suggestions? I would like to show the password only if private is checked. in the head
<script type="text/javascript"> function onChange(obj,show){ var el = document.getElementById("otherOpt"); if (obj.checked==show) { el.style.display=''; } // Show Options else { el.style.display='none'; } } </script> in the body
<b>Website Authorization:</b> <br><input type="radio" name="accessprotect" value="0" <?php if($radioaccess=='0') {echo("checked");} ?> onchange="onChange(this,false)"/> Public | <input type="radio" name="accessprotect" value="1" onchange="onChange(this,true)" <?php if($radioaccess=='1') {echo("checked");} ?>/> Private<div><br>Private Website Access Code: <input type="password" name="accesspword" size="25" maxlength="29" value="<?php echo( $accessword ) ;?>" /> Please use a different code than your account password.</div>
|
Fotiman

msg:4266790 | 2:02 pm on Feb 14, 2011 (gmt 0) |
Your div is missing the "otherOpt" id. Try this: <div id="otherOpt" <?php if($radioaccess=='0') {echo("style='display:none;'");} ?> ><br>Private Website Access Code: <input type="password" name="accesspword" size="25" maxlength="29" value="<?php echo( $accessword ) ;?>" /> Please use a different code than your account password.</div>
|
weddingm

msg:4267126 | 1:45 am on Feb 15, 2011 (gmt 0) |
thanks fontiman
|
|