Results 1 to 9 of 9

Thread: Simple Controls Gallery v1.3 - The word "null" shows in IE

  1. #1
    Join Date
    Mar 2009
    Location
    Chesapeake, VA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Simple Controls Gallery v1.3 - The word "null" shows in IE

    1) Script Title: Simple Controls Gallery v1.3

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...plegallery.htm

    3) Describe problem: In IE in the upper left of the div, the word "null" shows. How can I get rid of it? It looks fine in Firefox and Safari. Here's a link so the problem can be viewed (must use IE to see the issue): http://www.silverstreetva.com/Gallery3.asp

    Additionally: Is there a way to make the boxes that hold the text and/or controls always visible?

    Thanks,
    H.L.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm at a glance I can't see why it's doing that actually. Just to test things out, what happens if you create a blank page, and just have the Simple Gallery script on it?
    DD Admin

  3. #3
    Join Date
    Mar 2009
    Location
    Chesapeake, VA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I'll check it out and send you the link. Thanks, H.L.

  4. #4
    Join Date
    Mar 2009
    Location
    Chesapeake, VA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    OK. Unfortunately (for me anyway) it works fine on a blank page. So I just need to figure out what in my header is causing it.
    Last edited by hlwilson3rd; 04-07-2009 at 12:47 AM.

  5. #5
    Join Date
    Mar 2009
    Location
    Chesapeake, VA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I can't find any reason for this. It works on the blank page just fine. The markup validates. The css has only 4 errors which are the use of the overflow-x and overflow-y properties and those properties are absent on this page. Any suggestions? I hate IE!
    Last edited by hlwilson3rd; 04-07-2009 at 01:05 AM.

  6. #6
    Join Date
    Mar 2009
    Location
    Chesapeake, VA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Little bump... Anyone have any ideas?

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There are four places in the script where an element or elements are having their innerHTML property set to null. Technically this is supposed to be the same as setting it to an empty string. However, some browsers (not just IE) will render this as the literal word 'null'. That's what's happening here. So you could change those all to:

    .innerHTML = '';

    However, IE 8 sometimes has a problem with that. And the proper way to empty an element is to remove all of its child nodes. So I've made up a version of the script that does just that, and it appears to solve the problem. Here it is (attached):

    Attachment 2618
    - John
    ________________________

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

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    hlwilson3rd (04-12-2009)

  9. #8
    Join Date
    Mar 2009
    Location
    Chesapeake, VA
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Amazing! You rock! I looked at those NULL as literals, but thought I'd try here first. I edited the script further and added another "oninit" handler to get the navpanels to remain visible. Thanks so much for all of the help!
    Last edited by hlwilson3rd; 04-12-2009 at 10:33 PM.

  10. #9
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Nice work John! I suspected it had something to do with IE's mishandling of null, but didn't have a chance to really look into the issue. I might incorporate your fix into the script the next time it's updated.
    DD Admin

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
  •