Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Aug 2008
    Posts
    32
    Thanks
    16
    Thanked 0 Times in 0 Posts

    "Pop-Up" Windows

    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

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    TMRChris (08-24-2008)

  • #3
    New Coder
    Join Date
    Aug 2008
    Posts
    32
    Thanks
    16
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    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

  • Users who have thanked Philip M for this post:

    TMRChris (08-24-2008)

  • #5
    New Coder
    Join Date
    Jul 2008
    Location
    Newcastle, UK
    Posts
    92
    Thanks
    3
    Thanked 7 Times in 5 Posts
    And a quick search on Google turns up thousands of results.

    Moodle.
    Beyond Moodle

  • #6
    New Coder
    Join Date
    Aug 2008
    Posts
    32
    Thanks
    16
    Thanked 0 Times in 0 Posts
    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.

    :]

  • #7
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by Philip M View Post
    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.

    Code:
    <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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •