deemurphy Posted February 10, 2009 Share Posted February 10, 2009 Hello, I am using <input type=button value=Close onclick='window.close()' class=button1> but it does not close the window. What have I done wrong with this code. Also how can I have a form do one thing with a continue button and another with an exit button. Thank you LadyDee Quote Link to comment Share on other sites More sharing options...
webster08 Posted February 10, 2009 Share Posted February 10, 2009 Hello, I am using <input type=button value=Close onclick='window.close()' class=button1> but it does not close the window. What have I done wrong with this code. you can only do this with a pop-up window or window.close() sometimes works when you resize a window (that your wanting to close). i would also use window.close(), like so: "javascript:window.close()"; if i was going to add this function to an inline onclick event (in my button). Also how can I have a form do one thing with a continue button and another with an exit button. create two separate functions (with different actions) and add one function to one button and one function to the other button. Quote Link to comment Share on other sites More sharing options...
deemurphy Posted February 10, 2009 Author Share Posted February 10, 2009 I am attaching the page that has the windows.close() because it still is not working. Thank you LadyDee [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
webster08 Posted February 10, 2009 Share Posted February 10, 2009 if you are just opening the page / visiting the page or you access it through a normal like; most newer browsers will not let your use window.close(). you will have to use it as i described above. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.