J
Jai Singh
I am new to Classic ASP development and web development in general. I am
working on a data entry page in Classic ASP that preservers state through the
Session object.
I have on HTML FORM <SELECT> combo that provides a list of countries.
I have wired this up to cause a postback via "<select name=""txtCountryID""
size=""1"" onchange=""mainform.submit()"">".
In the asp page I respond to this post back and I change the input type of
another data entry field based upon the current value of the txtCountryID
<SELECT> control.
Meaning, another control is switched to either an <INPUT type="text" or an
<SELECT> itself.
For example, if the Country is US then the state data entry field is a list
of predefined states via a select combo, but if Country is CN then the state
data entry field is a blank text input.
The problem that I notice is that a user can use the Browsers navigation
buttons to move back to a pre-existing page. In some situations the
following occurs...
User chooses country US and selects a state from the state select list of CA
and then changes the country to CN and the state field changes, correctly, to
an input text that is empty.
User navs to prior page via browser.
Page now displays the Country of CN with the state <SELECT> that has a value
of CA!
I detect no post-back in my page when the browser navigation occurs.
What is the proper way to create the user interaction and deal with this
problem?
Thanks in advance,
Jai Singh
working on a data entry page in Classic ASP that preservers state through the
Session object.
I have on HTML FORM <SELECT> combo that provides a list of countries.
I have wired this up to cause a postback via "<select name=""txtCountryID""
size=""1"" onchange=""mainform.submit()"">".
In the asp page I respond to this post back and I change the input type of
another data entry field based upon the current value of the txtCountryID
<SELECT> control.
Meaning, another control is switched to either an <INPUT type="text" or an
<SELECT> itself.
For example, if the Country is US then the state data entry field is a list
of predefined states via a select combo, but if Country is CN then the state
data entry field is a blank text input.
The problem that I notice is that a user can use the Browsers navigation
buttons to move back to a pre-existing page. In some situations the
following occurs...
User chooses country US and selects a state from the state select list of CA
and then changes the country to CN and the state field changes, correctly, to
an input text that is empty.
User navs to prior page via browser.
Page now displays the Country of CN with the state <SELECT> that has a value
of CA!
I detect no post-back in my page when the browser navigation occurs.
What is the proper way to create the user interaction and deal with this
problem?
Thanks in advance,
Jai Singh