#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    20
    Rep Power
    0
    i have a form.
    a table resides in the form.
    the table consists of 3 rows (a unique ID is assigned to each row) with a total cell count 3 (i.e., 1 cell per row).
    one field resides in each cell.

    above the table are three hyperlinks that control display of each row.

    example drawing:
    Code:
    link1 link2 link3
    +------+
    |      | - row has id="row1"
    +------+
    |      | - row has id="row2"
    +------+
    |      | - row has id="row3"
    +------+
    
    [[submit]]

    link1 sets row2 & row3 display = none - row1 displays.
    link2 sets row1 & row3 display = none - row2 displays.
    link3 sets row1 & row2 display = none - row3 displays.

    in NS6, clicking submit only sends fields that are in a visible row. is there a way around this?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    15
    Sure, instead of display: none, use visibility: hidden. You see, by setting the display: none of an element, you are practically "deleting" it from your page. So, its quite normal that the submission works only for those elements that are still "displayed" on yur page.

    Just one note: setting the visibility to hidden will preserve canvas space, which means the object will just vanish, but the space it occupied will be still there...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    20
    Rep Power
    0
    Thanks!
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    6
    Rep Power
    0

    Re: Dwarf's comments


    I disagree with dwarf's assessment. There is nothing in the CSS-1, CSS-2, or HTML 4.x recommendations that I am aware of that would dictate Netscape 6's exclusion of form elements hidden with "display: none". Internet Explorer does *not* exclude such form elements, incidentally. I consider this a Netscape 6 bug, of which, unfortunately, there are many.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    6
    Rep Power
    0

    Re: Netscape 6 display:none Form-Submission Bug


    Sorry, should have researched this before posting, but here is confirmation that this behavior *is* a Netscape bug:

    http://bugzilla.mozilla.org/show_bug.cgi?id=34297

    It appears that the Mozilla team will attempt to fix this by build 0.9, but I can't say how that will translate into a fix in Netscape 6.x. Netscape 6.01 has this same problem, btw. Perhaps a fix by 6.02, but that is a complete guess.

    In the meantime, dwarf's suggested workaround is probably the best available.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    15
    Well, I was speaking from my printing experience. When you set the display property to "none", those elements don't print. So I just went that way.

    Anyways, visibility is something that should be used in these situatations, because it clears all of those risks...
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    6
    Rep Power
    0
    dwarf,

    In theory, I would agree with you that using "visibility: hidden" would be an appropriate workaround in order to support Netscape 6.x. Unfortunately, based on further testing with Netscape 6.01, I have to say there is no satisfactory way to hide form elements with the expectation that they will submit successfully.

    Using "visibility: hidden", Netscape 6.x will submit the form element, but it will *not* submit the value. This, paired with the problems of using "display: none", is a fatal flaw for Netscape 6. This is simply unforgivable.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    15
    Jesus...I had no idea that that thinsg is so buggy. I still haven't tried Mozilla 0.7 that much, since its newer in date than Netscape 6.0 (I'm not sure about 6.1 though...) that much, so I cannot say whether the bug is still in there, but it is awful really.

    Just an informative question: hidden fileds, as in <input type="hidden"> still work as expected, right??
  16. #9
  17. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    20
    Rep Power
    0
    i'm not too sure about hidden fields ... i'll have to test it later.

    for now, onsubmit triggers display of all rows before the form is sent out.

    sucks, i know, but that's the only way i could think of (other than mirroring all the field values in hidden fields).

    oh ya, screen redraw sux bad in NS6 -- toggling display none/block usually results in "traces".

    [Edited by labcede on 02-15-2001 at 10:46 AM]
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    15
    How about trying Mozilla 0.7?? Itsd only 9 megs to download, and display toggling works just fine. No traces...NS 6 was made some 3 versions ago, I think...
  20. #11
  21. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    6
    Rep Power
    0

    Mozilla 0.8


    I ran my test page (with the visibility property of some form elements set to "hidden", and the display property of some others set to "none") using Mozilla 0.8 (just released). The hidden form elements did succeed, although the "display: none" elements did not. Curiously, I retested in Netscape 6.01 (which is based on the Mozilla build from 01/31/2001), and it works now. I'm not sure if that suggests intermittent problems with hidden form fields, or if installing the Mozilla 0.8 build on the same machine might have updated a shared file.

    Bottom line, however, is that form fields with their display property set to "none" still do not succeed.

IMN logo majestic logo threadwatch logo seochat tools logo