Problem with display:none and firefox

Last post 05-30-2007, 3:16 PM by Navarone. 7 replies.
Sort Posts: Previous Next
  •  04-02-2007, 8:35 AM 27918

    Problem with display:none and firefox

    Grabbed your ASP component for integrating into our current system, and it worked really great until we tried to implement it to how our current design is working.

    We have a step-by-step way of adding things and depending on what the user chooses certain HTML elements are shown or hidden. And its now the problem occurs, when the user loads the page the editor is in a div with style="display:none" and later on is shown with style="display:block";

    Now the user cannot enter anything into the editor unless first changing to HTML view and then switching back. Although the editor now works i cannot grab it later when submitted.

    Took a few hours too narrow it down to this problem, you guys have any solutions besides making a new sort of design?

    Everything works perfectly fine in IE by the way.

    Thanks for any responses.


  •  04-02-2007, 6:15 PM 27941 in reply to 27918

    Re: Problem with display:none and firefox

  •  04-16-2007, 8:28 AM 28421 in reply to 27918

    Re: Problem with display:none and firefox

    Just a quick option...  This may or may not work:
     
    I assume you're using JavaScript to do the dynamic CSS changes.  From what you've said in your previous post, I assume your code looks something like this:
     
    if (some condition) {
       document.getElementById('div_id').style.display = "none";
    } else {
       document.getElementById('div_id').style.display = "block";
    }
     
    Try changing .display = "block" to .display = "".
  •  04-21-2007, 8:52 AM 28664 in reply to 27918

    Re: Problem with display:none and firefox

     
    I had the same issue , But I found a work-around for that ....
    It worked for me.
     

    Replace:

    Code:

    <span id="test1" style="display:'none'">

    With:

    Code:

    <span id="test1" style="display:none">


    Free Ajax Books
    Free CSS Books
    Free PHP Books
  •  04-26-2007, 4:33 PM 28902 in reply to 27918

    Re: Problem with display:none and firefox

    Similar if not the same problem here.

    I am trying to set the initial text of the editor to something from the database. The editor resides in a 'hidden' block until the user clicks on something to 'unhide' it.   I'll include the example at the bottom.

    Works fine in IE, but throws an error in FF. The error *only* is thrown if the encompassing block is hidden. Take the 'display:none' out and we're good as gold.

    ----Begin Head----
    myEditor.Text = [[FromDataBase]]
    ----End Head----

    ----Begin Body----
    <a href="#" onClick="jsChangeStyleToBlock('DivEdit'); return false;">Show Editor</a>
    <div id="DivEdit" style="display:none;">
      <CE:Editor id="myEditor" runat="server"></CE:Editor>
    </div>

    ----End Body----

    ----Begin Error (Thx to FireBug)----
    uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.designMode]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://SITE/CuteEditor/Load.ashx?type=scripts&file=Gecko_Loader :: Ox87a :: line 3" data: no]
    ----End Error----

    Edit: Oh, btw, this worked fine before I upgraded us to the most recent version.

  •  05-24-2007, 1:57 PM 30053 in reply to 28902

    Re: Problem with display:none and firefox

    Yeah, i'm having the same problem with version .net 6 and firefox. The problem is that you cannot set the design mode for a hidden or none displayed item...
     
    I guess it should be validated in the javascript to see if the object is hidden or not before setting the designmode to on..
     
    I would really need that fix.
     
     
  •  05-27-2007, 11:21 AM 30133 in reply to 30053

    Re: Problem with display:none and firefox

  •  05-30-2007, 3:16 PM 30249 in reply to 30133

    Re: Problem with display:none and firefox

    I am having an issue in FF that I think is also related to the display:none but I havent been able to identify it yet.
    http://dev-alcon.virtualhorizons.com/catalog_pages/Dimensions.asp?rollover=1

    part of number menu seems to be getting blocked by the drop down menu even though it is set to display:none

    I am really perplexed on this one. I sure hope you guys can help.



View as RSS news feed in XML