Paulhar Posted December 5, 2009 Share Posted December 5, 2009 Hi All,I'm sure this must have been asked before but I've searched everywhere with no luck.I have used the code below to pop up a 'help' page Protected Sub BtnHelp_Click(ByVal sender As Object, ByVal e As System.EventArgs) Page.ClientScript.RegisterStartupScript(Me.GetType(), "NewWindow", "window.open('register_help.htm','','')", True) End Suband now I want to have a 'Close' button on this help page which closes it.I also do not want any 'Are you sure' warnings - just click on the button and the page closes.Any help much appreciated.CheersPaul Link to comment Share on other sites More sharing options...
student101 Posted December 5, 2009 Share Posted December 5, 2009 'Are you sure' warnings - just click on the button and the page closes.AFAIK, "A no warnings" when closing a popup can only be achieved if a window opened the popup.Anyways; <a href="java script: self.close ()">Close Window</a>OR<a href="java script: window.close()">Close Window</a> Link to comment Share on other sites More sharing options...
Paulhar Posted December 7, 2009 Author Share Posted December 7, 2009 Thanks for the reply, it works fine. Is there an easy way of attaching this to a 'close' button instead of just having a text link on the page ?CheersPaul Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.