Happy Wednesday Experts!
I have a website, where there is an alert which has code as below
@if (\Session::get('message')<>'')
<script>
window.onload = function ()
{
message = 'Success message';
$.notify(message, {timeout: 3000,pos: 'top-right'});
}
</script>
@endif
Now, It is working perfectly. After I submit, I get a message from code behind "Success message" and now I moved to a different page. It is loaded without any problem. I decided to click on back button of browser and I see that success message. It shows the Alert message (success message) .
Could someone help me with this?
After show message, before moving any other page, I already cleared session message.
I believe I have something to do with caching and postbacks but not sure how or what to do
Aucun commentaire:
Enregistrer un commentaire