View Full Version : History.back show all hidden textfields

07-22-2010, 05:55 PM

I am hiding two textfields on a list box field selection value i.e. depending on selected value of listbox, either textfield is visible or hidden. The form uses oracle database in backend that has few check. When database code throws an error, a different form is loaded with error message. Here user has ability to press back button which uses history.back(). The problem is when original form come back all hidded text fields are visible.

I tried add code on windows.onLoad to hide textfields, but its not working.
Help needed.


07-23-2010, 03:04 AM
There is no such thing as:


I would imagine that what you are thinking of is:


However, history.back() doesn't always (depends upon the browser) execute the onload function of the page that it loads.

So you should change history.back() to an actual link to the page. Then you can hide or show whatever you want onload.

But I imagine you want history.back() because it preserves other choices the user has already made and/or data that they may have already entered.

If that's the case, you need to use server side code, like PHP or asp, etc.