...

View Full Version : "Pop-Up" Windows



TMRChris
08-24-2008, 12:52 AM
Hey there,

I own a radio website, and obviously want a window to "pop up" with the media player and relevant information I have located on the server.

A lot of radio sites have a button 'LISTEN LIVE' of which is an image and you click that and hello listen live window.

Question is.. how do I do that?

I've tried a simple pop up window script, even one that a friend sent me but when clicking on the button the window doesn't "pop up". Can somebody help me please?

Many Thanks,
Chris

rangana
08-24-2008, 06:47 AM
window.open() (http://developer.mozilla.org/En/DOM:window.open)

TMRChris
08-24-2008, 02:52 PM
Thanks for the reply.
Is there any chance you could put it in to script for me with instructions on where to put it?

I know the link has many but it all seems too confusing. I'm new to this, so any help would be greatful.

Philip M
08-24-2008, 04:46 PM
FIRST: Copy this code into the <HEAD>...</HEAD> of your HTML document --

<script type = "text/javascript">
function arcplyr() {
win=window.open('http://www.yourradiostation.com/arcplyr.html', 'popplyr','top=300,left=300,scrollbars= 1,width=40,height=350');
win.focus();
}
</script>

SECOND: Paste this code into the <BODY> of your HTML document at the place where you want the button to appear:-

<img border='0' src='http://www.yourradiostaion.com/ListenLiveButton.gif' width='60' height='50' onclick='arcplyr()'>

Of course, this is an example only - you must alter the details to suit.


The older I grow the more I distrust the familiar doctrine that age brings wisdom.
H.L. Mencken 1880-1956, American Editor, Author, Critic, Humorist

Moodle
08-24-2008, 05:05 PM
And a quick search on Google turns up thousands of results.

Moodle.

TMRChris
08-24-2008, 06:36 PM
Many thanks Philip!

Moodle - I had been looking on a particular site; JavascriptKit, that's how I found this forum. I couldn't find the right codes on their site and a forum is always useful.

:]

Bill Posters
08-24-2008, 07:32 PM
FIRST: Copy this code into the <HEAD>...</HEAD> of your HTML document --

<script type = "text/javascript">
function arcplyr() {
win=window.open('http://www.yourradiostation.com/arcplyr.html', 'popplyr','top=300,left=300,scrollbars= 1,width=40,height=350');
win.focus();
}
</script>

SECOND: Paste this code into the <BODY> of your HTML document at the place where you want the button to appear:-

<img border='0' src='http://www.yourradiostaion.com/ListenLiveButton.gif' width='60' height='50' onclick='arcplyr()'>

Of course, this is an example only - you must alter the details to suit.
It's typically worth using an anchor element, as img elements can't be tabbed onto using the keyboard, which means that keyboard users wouldn't be able trigger the player.


<a href="#" onclick="arcplyr(); return false;"><img src="http://www.yourradiostation.com/listen-live-button.gif" alt="Open the media player"></a>
Of course, the above link should be added to the page using js, so that non-js users aren't presented with an unusable link.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum