Jump to content

2 question


deemurphy

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.