how to show alert on refresh and window close for ie and firefox

Posted by Vineeth1311 under JavaScript on 4/25/2009 | Views : 3659 | Status : [Member] | Replies : 2
how to show alert on refresh and window close for IE and Firefox in same page need it urgently help me on this.




Responses

Posted by: Vuyiswamb on: 4/27/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning


Look at the Answer i gave here

http://www.dotnetfunda.com/forums/thread485-problem-for-window-closing-code.aspx


And add an Alert , and in the case of refresh check if the Postback is true then display the Alert.

Thank you for Posting at dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Vineeth1311, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Anup1252000 on: 8/2/2009 [Member] Starter

Up
0
Down
write these lines of code


<script type="text/javascript">

function refresh()
{
alert('ur page has been refresh');
}

// ]]>
</script>
</head>
<body onload="refresh();" onunload="refresh();">


https://wordpress.com/pages/anuphosur.wordpress.com

Vineeth1311, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response