Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 47
  1. #31
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,184
    Rep Power
    10
    PHP is static, you would have to use a JS framework to pull that info in automatically without refreshing the page.

    Either using AJAX or .load():
    http://api.jquery.com/load/

  2. #32

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Location
    UK
    Posts
    86
    Rep Power
    8
    ok wich code on that page am i using?

  3. #33
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,184
    Rep Power
    10
    This will take some extra time for me to explain a whole new coding language to you sorry. You will have to read the page yourself and learn it, otherwise I can charge for my services.

    Let me know if you have any issues.

  4. #34

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Location
    UK
    Posts
    86
    Rep Power
    8
    so your saying that php code wont work when a dj is on air? im due on air tonite at 18:00 so it wont show my image

  5. #35
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,184
    Rep Power
    10
    PHP is a server side language that will execute the script to fetch the DJ on air. The script will only load the DJ on air upon page load. As in, if you load the page at 17:59, and the click goes to 18:00, the DJ on air will not update.

    You asked for a solution to have your website automatically refresh the DJ on air so you wouldnt have to refresh the page when the click ticks over. For this, you need a front-end language such as Javascript/JQuery to tell it to fetch the current dj on air every 30 seconds (or thereby).

    The script you have now works fine, it will display the DJ on air when a user visits your website. But if you want it to automatically update the DJ on air without the page refreshing, you will need to use JQuery to make that happen.

  6. #36

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Location
    UK
    Posts
    86
    Rep Power
    8
    oh ok so i won't be able to see the change in the script then?

    as i have friday saturday and sunday set for start time: 18:00 End Time: 20:00

  7. #37

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Location
    UK
    Posts
    86
    Rep Power
    8
    ajax.jpgok so i have this, were would i put it

  8. #38
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,184
    Rep Power
    10
    What do you mean? Of course you will see the changes.

  9. #39

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Location
    UK
    Posts
    86
    Rep Power
    8
    ajax.jpgi have this were would i put the code. it says put meta tag in the head but wich head

  10. #40
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,184
    Rep Power
    10
    Between the
    Code:
    <head></head>
    tags.

Bookmarks

Posting Permissions

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