JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 8th, 2001, 03:12 PM
labcede labcede is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 20 labcede User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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?

Reply With Quote
  #2  
Old February 8th, 2001, 03:49 PM
dwarf dwarf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 300 dwarf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
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...

Reply With Quote
  #3  
Old February 9th, 2001, 08:13 AM
labcede labcede is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 20 labcede User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks!

Reply With Quote
  #4  
Old February 14th, 2001, 12:34 PM
jaylard jaylard is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 jaylard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #5  
Old February 14th, 2001, 12:53 PM
jaylard jaylard is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 jaylard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #6  
Old February 14th, 2001, 02:28 PM
dwarf dwarf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 300 dwarf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
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...

Reply With Quote
  #7  
Old February 14th, 2001, 03:39 PM
jaylard jaylard is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 jaylard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #8  
Old February 14th, 2001, 04:03 PM
dwarf dwarf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 300 dwarf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
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??

Reply With Quote
  #9  
Old February 15th, 2001, 11:43 AM
labcede labcede is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 20 labcede User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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]

Reply With Quote
  #10  
Old February 15th, 2001, 04:19 PM
dwarf dwarf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 300 dwarf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
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...

Reply With Quote
  #11  
Old February 16th, 2001, 10:37 AM
jaylard jaylard is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 6 jaylard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > NS6 - DHTML (display: none) - form submission - fields not passed

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap