Strange "back" button effects!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • harry

    Strange "back" button effects!

    Using IE 5.5 (sp2) - no other browser compatability is neccessary!

    When the user makes a change to a text field I record the "dirty" event in a
    hidden text field i.e value set to "true". As soon as this field is "true"
    several extra buttons are made visible/invisible.

    When the page is submitted the data may result in errors which are
    dispplayed on an error page. On this page there's a button that just does a
    onClick="javasc ript: history.back(); ".

    During this reload I need to be able to determine if the dirty field was set
    so as to show/hide the appropriate buttons. The trouble is during loading
    the value of the field is blank but when the page is displayed it is
    "true" - too late to set the buttons!

    Any ideas?

    thanks

    harry


  • Robert

    #2
    Re: Strange "back&quot ; button effects!

    [color=blue]
    > During this reload I need to be able to determine if the dirty field was set
    > so as to show/hide the appropriate buttons. The trouble is during loading
    > the value of the field is blank but when the page is displayed it is
    > "true" - too late to set the buttons!
    >
    > Any ideas?[/color]

    You could save the data in a cookie. The user could turn off cookies in
    the general case, but maybe not in your case.

    You will want to use some existing code to manipulate cookies instead of
    developing your own.

    ~kaeli~ has developed some cookie code. You may view it in this article:


    ..1af96c2a4f8ab c94989dcc%40nnt p.lucent.com

    Also, ~kaeli~ reports that:
    There's some even better code that sets more cookie properties like
    domain, secure, path, etc here.




    As an alternative to going to a new page, you could popup a hidden div
    with your error message in it.

    Robert

    Comment

    Working...