javascript - how to make a button on a popup window that closes that popup window -


i have made popup window button that's supposed close window. however, not work. here code:

 winpopup.document.write(<input type = "button" value = "close window" onclick = "closewindow();">)   function closewindow(){     winpopup.close();  } 

winpopup doesn't have closewindow() method. use opener's.

function closewindow(){     opener.winpopup.close(); } 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -