tags:

views:

80

answers:

3
You have started writing or editing a post.
+7  A: 

you'll need to do ajax polling for the "load new answers" alert that appears whilst you are writing an answer.

Here's a nice tutorial for ASP.NET using jQuery

For the alert when you attempt to navigate away from a page when you have started typing an answer/ editing a post, look at the onunload event. A confirm dialog is used as opposed to an alert

Russ Cam
A: 

Are we talking about SO warning you when you try to navigate away from a page with a partially filled in comment/answer ? Check out the onunload() method in Javascript. See here for an example.

Brian Agnew
I mean what the popup dialog really is?It's similar to an alert,but it's not.
Shore
I think your question may need rephrasing or clarification
Brian Agnew
A: 

add this script to the head portion of your page:

<script language="javascript">
  window.addEventListener('beforeunload', onUnload, false);
  function onUnload(e)
  {
    e.returnValue = "some Text";//this is your message
    e.preventDefault();
  }
</script>
Amarghosh