ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Enhancing ASP.NET Pages with JavaScript
Subject:   Problem with Page.RegisterStartupScript
Date:   2006-06-27 04:35:50
From:   ROCK007
Response to: Problem with Page.RegisterStartupScript

Hi All,
Another same alike query. When we add a Page.RegisterStartupScript and try to browse to another page from the current page (where this javascript is written), we get a message saying "Do you really want to navigate from the current page?" since we have used window.BeforeUnload to halt when some values are changed. Even though we have clicked "Cancel" button to avoid going out of the page, it stays back but after clicking the "save" button it does not fires the "Button_Click" event handler. This Button click handler works with the normal case.


What should be done to drap the Button_Click event in such case?


ThanX