Click to See Complete Forum and Search --> : popup help
Vchat20
03-31-2003, 03:04 PM
ok. I am making a page on my site which will have the embedded windows media player. but I dont want to restrict people from having to have the whole site open to listen. so I want to have a link that will open a popup window with the player in that. dont know how though. I already have the html file specially made for the popup (it is HERE (http://pokeradio.web1000.com/listenpop.html))
any help would be appreciated.
Try something like this...
<script language="javascript" type="text/javascript">
function openwin(url)
{
window.open(url,"Window Name","width=400,heigh=300")
}
</script>
</head>
<body>
<a href="yourpage.htm" onclick="openwin(this.href); return false;">Open Music Page</a>
Vchat20
03-31-2003, 03:50 PM
hmm. didnt seem to work.
what was the link that went into the href="" spot? one that would only allow the onclick="" value to run? I forget what is was.
Sorry. Try this instead:
<script language="javascript" type="text/javascript">
function openwin(url)
{
window.open(url, "winname", "width=400,height=300");
}
</script>
</head>
<body>
<a href="yourpage.htm" onclick="openwin(this.href); return false;">Open Music Page</a>
The link it will open is yourpage.htm. If users have javascript disabled, the link will simply open in the current window.