Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alert message at load time gives alert at refresh

Status
Not open for further replies.

Pro79

Programmer
Dec 11, 2003
24
0
0
IN
HI
I am making one application in struts. I have to display alerts when some work is complete. what i do i set some variables in request and at load time i put a javascript function then it works.
but if i refresh the page or after going another page i come back to previous page i get the same alert.
I coming back to page by using javascript.history(-1). I can handle this javascript but i am not able to handle those variables if the page is refreshed.

is there any other way to give this alert.

Waiting for reply
Thankyou
Regards
 
Nope. This situation cannot be handled as whenever the Refresh/F5 is clicked the page is not shown from browser cache. Instead the previous form action is re-submitted to the server and the server responds back freshly. At this moment your flag will be in ON state and the alert will appear once the task is complete.

If it is that critical and if you can restrict the user from clicking F5/refresh then maintain the state in the session and put the flag there and inform him that either he has already done the operation once / he cannot do a refresh operation with your application. But am not sure whether this solution is appropriate and matches with your requirement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top