SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Firefox and hidden inputs

    Hi I am using firefox 3 on Mac OSX and for some reason if I have an input type="hidden" element in a form it still displays the input? It ignores the fact that it is hidden. I have to always have to add some inline CSS, namely style="display:none" to get around this in firefox. Anyone else encountered this?

  2. #2
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For this to work on all the browsers including ie6 you will have to add a class to these:
    input.hidden { display: none; }

    class="hidden"

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    @Global Cooling, what extensions do you have enabled for Firefox? Any of the internal user style sheets been modified? Firefow would not show hidden inputs unless the browser was altered, or the site's style sheet made them visible.

    Quote Originally Posted by cooper.semantics View Post
    For this to work on all the browsers including ie6 you will have to add a class to these:
    input.hidden { display: none; }

    class="hidden"
    Shouldn't need that with hidden inputs (type="hidden").
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  4. #4
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Shouldn't need that with hidden inputs (type="hidden").
    Correct, by definition and the behavior that html states you are absolutely correct. I on the other hand have come upon sites that have shown input value="hidden", which probably as you have said -js ext. being the culprit. That is why I provided the fix

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Firstly, thanks for the replies.

    The extensions I have on firefox are: firebug and I think I have another called web developer?

    I was glad to hear that its not a native issue with firefox, I thought it was a bit of an absurd problem I was encountering...


Tags for this Thread

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
  •