Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: DHTML Window widget (v1.1) cause a white background flash

  1. #1
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window widget (v1.1) cause a white background flash

    Hi all!

    DHTML Window widget (v1.1) cause a white background flash

    the dhtmlwindow.js seems to be the source of the problem.

    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    anyone had that problem ?

    on http://www.wakooz.com change the language to see what i mean

    Cheers

    Sam
    Last edited by scubajoe; 10-31-2008 at 11:04 PM.

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

    Default

    Only seems to happen in IE. However, it appears you have a script error:

    Error: document.getElementById(d) is null
    Source File: http://www.wakooz.com/scriptstyles/index.js
    Line: 185
    This may or may not be related (code from the error in index.js):

    Code:
    // Hide and Show Divs
    function HideContent(d) 
    {
    	if(d.length < 1) { return; }
    	document.getElementById(d).style.display = "none";
    }
    I would assume you are passing a string (the id of the element to hide), but this test only protects against an empty string. What about the case (as evidenced by the error) when there is a string but no element with that id? I would do:

    Code:
    // Hide and Show Divs
    function HideContent(d) 
    {
    	if (d.length < 1)
    	 return;
    	else if (document.getElementById(d))
    	 document.getElementById(d).style.display = 'none';
    }
    Fix that, cross your fingers, and hope that takes care of your problem. If not, let us know.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    Made the modification acroding to your direction but
    it did not work

    the error on line 186 is in index.php it is calling the function fCity(obj) on line 395 in index.js

    i will look into that but i doubt it is the soure of my problem.

    Any help is really apreciated

    By the way i tried the original dhtmlwindow.js and the issue remain,

    Thanks

    Sam

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by scubajoe View Post
    Made the modification acroding to your direction but
    it did not work
    If by "it did not work" you mean the modification wasn't made to the live version, you are right. I'm still seeing:

    Code:
    function HideContent(d) 
    {
    	if(d.length < 1) { return; }
    	document.getElementById(d).style.display = "none";
    }
    Not:

    Code:
    function HideContent(d) 
    {
    	if (d.length < 1)
    	 return;
    	else if (document.getElementById(d))
    	 document.getElementById(d).style.display = 'none';
    }
    at or about line 185 in your index.js file. And am still getting the error:

    Error: document.getElementById(d) is null
    Source File: http://www.wakooz.com/scriptstyles/index.js
    Line: 185
    This is not anything to do with function fCity(obj), as it has no:

    Code:
    document.getElementById(d)
    in it.

    However, I did say that this (function HideContent(d)) wasn't necessarily the cause. But it is hard for me to diagnose the live page while it still contains this known error. Please update the live installation with the correction I've outlined.

    Something else I looked into in the meantime was the demo page for the DHTML Window widget (v1.1) script. It doesn't exhibit the problem (flashing white as it launches a 'window') so this almost certainly has something to do with your implementation. Is there anything unusual about your implementation that you might be aware of? Did you fudge anything or push the script beyond its intended use in any way that you are aware of?

    Think about this. It's OK if you did something along these lines. It's just that if you did and can think of what that might be, it would probably help in determining either a solution, or if a different script might be better suited to your needs.
    - John
    ________________________

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

  5. #5
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    I did change the code from

    function HideContent(d)
    {
    if(d.length < 1) { return; }
    document.getElementById(d).style.display = "none";
    }

    TO

    function HideContent(d)
    {
    if (d.length < 1)
    return;
    else if (document.getElementById(d))
    document.getElementById(d).style.display = 'none';
    }

    On the server and It created problems so i rolled back to what i had

    I will fix the javascript error on line 186 and let you know

    Thank's for helping

    Sam

  6. #6
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error message fixed

    Hi John

    I finally fixed my javascript error unfortunalty it wasn't the problem.

    If i remove the 2 following files from http://wakooz.com/index.php

    <script type="text/javascript" src="scriptstyles/windowfiles/dhtmlwindow.js"></script>
    <script type="text/javascript" src="scriptstyles/modalfiles/modal.js"></script>

    The language change stop giving me the with flash.

    the file that load the modal windows is:

    http://wakooz.com/scriptstyles/index.js

    Thank you for you help

    Sam

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    OK, this is another long shot, but not quite so much as my first idea. The page is reloading when the language changes. The background color for the page is set in style.css to:

    Code:
    body{ background:#8AAB3E; }
    But you have so many styles, it takes a little while for that to load. In the body tag itself, you have:

    Code:
    <body bgcolor="#FFFFFF">
    Hence, the white flash in IE, or at least it could be what's causing this. So change that to:

    Code:
    <body bgcolor="#8AAB3E">
    If that doesn't work out, we may need to use a different script or a different capability of this one (iframe) so as to not have to reload the entire page when the language changes.
    - John
    ________________________

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

  8. #8
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    the background in the page is set to #FFFFFF white but even if i change

    to #8AAB3E i get the same flash

    I had to set a bgcolor in the body to fix a style issue

    but with or whitout the bgcolor i get the same

    It must be a function that get's in conflict with the other scripts

    Again thanks for your help

    Sam

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    Once again, you haven't updated the live demo. I cannot proceed in troubleshooting if you do not carry through upon the recommendations with the live test page.
    - John
    ________________________

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

  10. #10
    Join Date
    Jan 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John,

    I put bgcolor="#8AAB3E" in the body tag of index.php

    Sorry about that i didn't change it because i know it is not the issue

    but i got the drill any other idea you have i will change for you in the

    live demo

    thank you

    Sam

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
  •