|
 |
asp_databases thread: Refresh and back button
Message #1 by James Kenney <JEK@m...> on Wed, 19 Dec 2001 10:03:08 -0500
|
|
We are creating and intranet site using SQL7 and asp. We set-up a page that
enters data into the database on the same page we confirm what was just
entered into the database. The problem comes in when the user clicks the
refresh button on the browser or the user clicks the back button and hits
enter again. The same information is put in again. Are solution was to
check certain fields that were being entered into the database that we
figured wouldn't be all the same. I was wondering how this issue could be
better handled.
Message #2 by "Chris Lee" <eck_e_thump@h...> on Wed, 19 Dec 2001 15:29:00
|
|
Hows about creating some session variables so that once the data has been
entered in correctly it sets the variable and before it tries to do the
same again on refresh it checks the variable for the correct value. If not
then don't do the updates.
Chris Lee
>
>
> We are creating and intranet site using SQL7 and asp. We set-up a page
that
> enters data into the database on the same page we confirm what was just
> entered into the database. The problem comes in when the user clicks the
> refresh button on the browser or the user clicks the back button and hits
> enter again. The same information is put in again. Are solution was to
> check certain fields that were being entered into the database that we
> figured wouldn't be all the same. I was wondering how this issue could
be
> better handled.
Message #3 by dmartin@z... on Wed, 19 Dec 2001 10:48:19 -0500
|
|
While not completely eliminating the problem
with the refresh and back operations, you
can run your website entirely within a child
window. The child window is opened with all the
toolbars hidden and in full screen mode. Of course,
you need to provide some window.close function.
And there may be problems with spawned child windows
within the opened child window. Without the visible
toolbars, a novice user won't have a means to refresh
or "back" arrow the page. Of course, you can always
press the right mouse button on any page and you
get the context menu which allows refresh,print,etc.
Another trick that prevents the "back" arrow, but not
the refresh, is to use the window.location.href.replace
() function. This function replaces the current url
with the target url, thus eliminating the pointer
to the previous page.
Also, if your ASP page is spending considerable time
processing some data requests, you might want to
issue response.flush,response.write("") at the top of
your page. This will clear the client browser and cue
the user to expect some momentary output.
Dallas
Quoting Chris Lee <eck_e_thump@h...>:
> Hows about creating some session variables so that
once the data has been
> entered in correctly it sets the variable and before
it tries to do the
> same again on refresh it checks the variable for the
correct value. If not
> then don't do the updates.
>
> Chris Lee
>
> >
> >
> > We are creating and intranet site using SQL7 and
asp. We set-up a page
> that
> > enters data into the database on the same page we
confirm what was just
> > entered into the database. The problem comes in
when the user clicks the
> > refresh button on the browser or the user clicks
the back button and hits
> > enter again. The same information is put in again.
Are solution was to
> > check certain fields that were being entered into
the database that we
> > figured wouldn't be all the same. I was wondering
how this issue could
> be
> > better handled.
>
> $subst('Email.Unsub').
>
|
|
 |