Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: AJAX Help!!

  1. #11
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by dubstep View Post
    I wouldn't know how to do this as I am not a coder. Would you please explain.
    Replace your <body> tag with <body OnLoad="window.open('link/to/radio/script.php', 'Radio Player', 'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=1, resizable=1, width=500, height=400, left=50, top=50');">

    This will open the popup when they load the page, if you want to be able to show if the cookie says so, do the following...

    PHP Code:
    <body <?php echo (($_COOKIE['showRadioPopup'] == "1") ? 'OnLoad="window.open(\'link/to/radio/script.php\', \'Radio Player\', \'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=1, resizable=1, width=500, height=400, left=50, top=50\');"' '')); ?>>
    Then in the radio popup Do the following:

    PHP Code:
    <?php
    ((isset($_GET['removeCookie']) ? setcookie('showRadioPopup''0'time()+29984678) : ''));
    ?>

    <a href="?removeCookie">Stop Windows Showing On Load</a>
    Baring in mind I havent tested this...

    Lew.
    Im not here to be loved, I love to be hated :-}


  2. #12
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    When implementing a feature like this, you're going to have some consistancy issues. There is no easy way to add a radio player that doesn't reload on a loading to a new destination without making the page in hand load via AJAX, or the hacky method of using an iFrame.

    You can easily put an overlay on the top left with a flash/embed/html5 based audio player, but the player will stop and re buffer every time they go to a new page or refresh. If you're willing to spend the extra time changing some the website structure, you could do AJAX loading pages which would then make the surroundings of the content consistant.


    www.fragme.co = a project.

Page 2 of 2 FirstFirst 12

Posting Permissions

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