Results 1 to 3 of 3

Thread: Detecting if DHTML is blocked

  1. #1
    Join Date
    Jul 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Detecting if DHTML is blocked

    Is there a DD code (or any suggestions if DD does not have one) to detect if a persons browser has dhtml scripting blocked? I would like to be able to detect this situation and then toggle a graphic at the top of my page asking the user to allow blocked content.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    That is what the <noscript></noscript> tag is for. To do what I think you are proposing, you would use it with a small script. This goes in the body of the page at the spot where you want it to appear:
    HTML Code:
    <noscript><img src="noactive.jpg"></noscript>
    <script>document.write('<img src="active.jpg">')</script>
    The only other thing you need are the two images. They can be whatever you make them to be.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes this worked. I feel dumb that this was so simple. Thanks jscheuer1 for the detailed response.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •