February 8th, 2001, 03:12 PM
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.
link1 link2 link3
| | - row has id="row1"
| | - row has id="row2"
| | - row has id="row3"
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?
February 8th, 2001, 03:49 PM
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...
February 9th, 2001, 08:13 AM
February 14th, 2001, 12:34 PM
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.
February 14th, 2001, 12:53 PM
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:
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.
February 14th, 2001, 02:28 PM
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...
February 14th, 2001, 03:39 PM
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.
February 14th, 2001, 04:03 PM
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??
February 15th, 2001, 11:43 AM
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]
February 15th, 2001, 04:19 PM
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...
February 16th, 2001, 10:37 AM
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.