I have been spending a lot of time trying to figure out how to debug my similar issue.
I have a form. I have a hidden piece of code: <div id="inner_content" style="display:none;"> <div style="background:#669966;color:#ffffff;padding:5px;"> <h3>Note</h3> <p><webobject name = "note"/></p> <p><br /><div class="yellow-right" id="saveNote"><webobject name="NoteSubmit">Save Changes</webobject></div></p> </div> </div>
There's just not enough information to go on here. My original point was mainly that I have a test case that demonstrates that, at least in FireFox and Safari 3, display:none does not appear to have any impact on the construction of the post parameters for a form, so I _believe_ display:none's a red herring if you're having a problem.
If your "note" is being set to null, it seems to me there are 2 possibilities:
1) the form value isn't being sent from the browser (which you can tell by printing out the form values in your action method) 2) you're changing your page structure in takeValuesFromRequest
I suspect what we're not seeing in your example that this div is surrounded by a conditional somewhere on the page whose value is changing, which is causing the text field to appear and take a null value, but I can't say for sure. In case #1, if the value from the notes field is in the request form values, then you know display:none had nothing to do with it, so you can stop looking at that. If it DOESN'T appear, then it didn't submit from the browser and you should focus your efforts on the browser side (either the server didn't generate the field, or there's something else funky going on).
ms |