|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Modification by JavaScript function won't stay, why?Hello, friends,
I have a .aspx page, which may change label text based on a user's selection. For example, if a user select Visitor from a drop-down HTML control, corresponding label will be changed to Visitor's Name from original value (Member's Name) by using a JavaScript function. It worked fine. However, if I moved to next page and then clicked Back button of IE back to this page again, all the label text were changed back to its original value (Member's Name in above example), although in drop-down it was still the correct value (Visitor in above example). Why and how to fix this problem? Any sample source code? Thanks. when the user goes back, the unchange event for the select does not fire
(because the select has a new value), so the context remains as originally rendered. the browser only caches the original page html, and field values. you need to add client script to do the work on page load to handle this case. -- bruce (sqlwork.com) Show quoteHide quote "Andrew" <And***@discussions.microsoft.com> wrote in message news:9C4AED5B-D0FE-430E-8E45-2BF68E84D80D@microsoft.com... > Hello, friends, > > I have a .aspx page, which may change label text based on a user's > selection. For example, if a user select Visitor from a drop-down HTML > control, corresponding label will be changed to Visitor's Name from > original > value (Member's Name) by using a JavaScript function. It worked fine. > > However, if I moved to next page and then clicked Back button of IE back > to > this page again, all the label text were changed back to its original > value > (Member's Name in above example), although in drop-down it was still the > correct value (Visitor in above example). > > Why and how to fix this problem? Any sample source code? > > Thanks. > >
Other interesting topics
.net objects to javascript?
Comparing values between two arrays Rowfilter property.. Compressing and spanning files on upload ASP.NET License or Royalties When to use FormsAuthenticationTicket() Cant start debugging - Tearing Hair From Scalp In HUGE CHUNKS ! Binding DataGrid to an XML document? making xml user information How to logout with program |
|||||||||||||||||||||||