[NFB-Web] java script code

Bryan Schulz b.schulz at sbcglobal.net
Wed Feb 2 06:19:53 UTC 2022


Hi,

 

I made sure all lines are showPhoneBoxes and it didn’t help.

I’ll post code if you like.

Thanks,

Bryan

 

 

From: NFB-Web <nfb-web-bounces at nfbnet.org> On Behalf Of Marcus Soulsby (NFBWV) via NFB-Web
Sent: Tuesday, February 1, 2022 11:39 PM
To: NFB Webmaster's List <nfb-web at nfbnet.org>
Cc: Marcus Soulsby (NFBWV) <msoulsby at nfbwv.org>
Subject: Re: [NFB-Web] java script code

 

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

 

 

 


 <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon> 

Virus-free.  <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link> www.avast.com 

_______________________________________________
NFB-Web mailing list
NFB-Web at nfbnet.org <mailto: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



-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/nfb-web_nfbnet.org/attachments/20220202/0ee44fff/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD0002.jpg
Type: image/jpeg
Size: 823 bytes
Desc: not available
URL: <http://nfbnet.org/pipermail/nfb-web_nfbnet.org/attachments/20220202/0ee44fff/attachment.jpg>


More information about the NFB-Web mailing list