[NFB-Web] java script code

Marcus Soulsby (NFBWV) msoulsby at nfbwv.org
Wed Feb 2 05:39:09 UTC 2022


This is just off the cuff, as I haven’t programmed in about a year and a half.

But in your get element by ID statement, you’re calling it “phone boxes“, but it looks like your div ID is “show phone boxes“.

Also a note, don’t know if this is a real consequence or not: they say that the get element by ID statement is not section 508 compliant. I had this in a training class once. I think it has to do with how it registers the speech. Just a thought, but not related

Hope this helps even a little bit.

Marcus

Sent from my iPhone

> On Jan 31, 2022, at 7:29 PM, Phil Seif via NFB-Web <nfb-web at nfbnet.org> wrote:
> 
> 
> 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
> _______________________________________________
> 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/msoulsby%40nfbwv.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/nfb-web_nfbnet.org/attachments/20220202/e390cf01/attachment.html>


More information about the NFB-Web mailing list