[NFB-Web] java script code

Phil Seif pseif at yahoo.com
Tue Feb 1 00:26:50 UTC 2022


 Hi.
I'm don't code a lot of JS, but I don't think you need a header function for this.  You might be able to us this inside your div instead:
<button type="button"onclick="document.getElementById('showPhoneBoxes').style.display = 'none'">My phone number is unlisted</button>

Phil



    On Monday, January 31, 2022, 03:43:24 PM EST, Bryan Schulz via NFB-Web <nfb-web at nfbnet.org> wrote:  
 
 
hi,

  

I am trying to change the appearance of a php page with java scrip/hide a div area 

(please don't reply with jQuery).

I have this code in the header area:

  

function showPhoneBoxes() {

                if (document.getElementById('chkUnlisted').checked) {

                                document.getElementById('phoneBoxes').style.display = 'none';

                } else {

                                document.getElementById('phoneBoxes').style.display = 'block';

                } //end document.getElementById if

} //end showPhoneBoxes function

  

html:

a checkbox with my phone number is unlisted

  

<div id="showPhoneBoxes">

html here

</div>

  

what am I missing?

i want the edit strips for the phone number to be hidden when the user checks the unlisted checkbox.

thanks,

Bryan

  

  


|  | Virus-free. www.avast.com  |

 _______________________________________________
NFB-Web mailing list
NFB-Web at nfbnet.org
http://nfbnet.org/mailman/listinfo/nfb-web_nfbnet.org
To unsubscribe, change your list options or get your account info for NFB-Web:
http://nfbnet.org/mailman/options/nfb-web_nfbnet.org/pseif%40yahoo.com
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/nfb-web_nfbnet.org/attachments/20220201/7c545c16/attachment.html>


More information about the NFB-Web mailing list