Open/Close Popup Button
Code:
Code:
<html>
<head>
<script language="Javascript" type="text/javascript">
<!-- Hide Script from Old Browsers
newWindow = null;
thisopen = 0;
function openWindow() {
if (thisopen == 0)
{
MusicWindow = window.open("http://YOUR_URL_HERE", "Music", "width=300,height=450,resizable=no,scrollbars=no,toolbar=no,menubar=no");
MusicWindow.focus();
document.form.Button.value = "Close Player";
} else {
if (MusicWindow && !MusicWindow.closed) {
MusicWindow.close();
document.form.Button.value = "Open Player";
}
}
thisopen = 1- thisopen;
}
// End hiding script from old browsers -->
</script>
</head>
<body>
<form name="form">
<input type="button" name="Button" value="Open" onClick="openWindow()">
</form>
</body>
</html>