PDA

View Full Version : Netscape 4 - Form content - Resize bug?


BlueMonday
07-29-2002, 08:23 PM
I am having a problem where the content of a form is lost when clicking the back button in NS4.

For example, I fill out a form, and click on the next button, search button, submit button, or whatever, and then click the back browser button to return to the form to modify the contents. When I return to the form, the fields have been cleared.

I work for a small firm, and believe that the web designer may have put in a piece of code to refresh the page in NS4, and this is causing the contents of the form to be cleared.

This does not happen in IE, nor in NS6.

I am aware of the NS4 resize bug regarding CSS layout. When I resize the browser window, the browser also refreshes, and this clears the content.

What can I do to allow the auto-refresh to prevent the CSS layout being affected, but keep content within the form when either resizing the browser window, or clicking on the back button?

Thanks!
BM.

welo
07-29-2002, 09:00 PM
Tough issue. If someone setup the code to refresh NS4 then there's not a lot you can do to retain the form data, though you can attempt to feel slightly sorry for the wacko deciding to use NS4. :D

On the other hand, it is possible to create a data-driven solution so all form fields are db-stored, then create an "Edit Your Entries" link on the resulting page that reinserts the info into the form fields upon returning to the page. Sounds a bit over the top to me just to cater to the three people who use NS4 with your form, though it prove conducive other applications later. In any case, you'll need to head into the serverside department around here to explore that.

There should be a way to store the info with session-only cookies too, though I'm afraid I can't be much help there.

justame
07-31-2002, 04:14 AM
Originally posted by welo
though you can attempt to feel slightly sorry for the wacko deciding to use NS4. :D

/me just a whispers® to wel...
??? are youuu calling just a mom® just a wacko®??? /me prefers to think of it more of...ummm...ifin' it works? n' tisnt broken??? whyyy upgrade??? lol...

Spookster
07-31-2002, 04:54 AM
In reference to the resize issue that is not a bug. When the browser window in NS4.x is resized the browser will refresh the page.

As for the contents disappearing when clicking the back button first check the settings of your browser to see if it is set to always check the server for updates as it will then request the page from the server each time you go to the page verses just using the one stored in the cache.

If that is not it check the coding for any meta tags that may be disabling the cache.

BlueMonday
07-31-2002, 02:08 PM
I checked the cache settings in the browser, but changing this to 'Never' still did not prevent the forms from losing their content when resizing the browser, or when clicking on the back button to return to the form.

There are no meta-tags in the page referring to the cache. Were one to be included that said:

content="cache">

Would this override the client's browser settings?

I believe there is a bug with NS4 whereby if the browser does NOT refresh during a resize, css layout is affected. Therefore I believe the page has been coded to trigger a refresh, to ensure the correct layout is maintained.

This IS only an issue with NS4, and not IE5x nor NS6x.

Any other thoughts?

Thanks.

brothercake
07-31-2002, 02:43 PM
There is that bug in ns4, and the reload/resize loop protects against it. I think you have three choices:

1 - accept the potential loss of form data and don't worry (my favoured choice)
2 - accept the potential loss of css layout and don't worry (not good)
3 - store the form data in a session cookie or database (complicated, but ultimately the best solution

BlueMonday
07-31-2002, 03:20 PM
Thanks Brothercake for breaking this down for me.

I would like to go the route of storing form content in a session cookie. Do you know any good sites, or pointers towards learning how to do this kind of thing?

Every other site I look at, appears to be doing something like this, and I'd like to support even the legacy NS4 users.

Thanks again.