Widget opening link inside frame - help
  • Vote Up0Vote Down DominicDominic
    Posts: 27Member
    We are about to launch our basic website and there is one last thing I am trying to get right. if we add a url to a show in airtime it displays in the schedule widget. This is excellent. However when you click on the READ MORE link , it opens the page within the frame. Its just a bit clumsy. Is there anything I can do to get it to open a tab or a new page instead?

    Have a look here http://www.basic.fm/ and click on monday in the schedule, then click READ MORE to see what I mean.

    Any help,or prods in the right direction greatly appreciated.

  • 10 Comments sorted by
  • On Basic.fm, the airtime widget is embeded in an Iframe through a wordpress feature.

    when you click on "Read more" you open the link in the same Iframe.

    you can do the same on any else website

    Post edited by Fred Percevault at 2012-05-27 18:34:14
  • Vote Up0Vote Down DominicDominic
    Posts: 27Member
    Hi Fred, thanks for the reply,

    Im not sure I understand you, or perhaps you didn't understand me. I dont want it to open the link in the same iframe, I want it load the link in a new window. i.e. target="_blank"

    I tried hacking around with the jquery.showinfo.js , in particular a line :
    '<li>'+(url.length > 0 ? '<a href="'+url+'">'+options.miscText.readMore+'</a>':'')+'</li>'+

    but I am very rusty, I suspect I need to pop something into a header also :)

  • On line 37 in the showinfo.js file, change

    tableString += "<td><a href='" + shows[i].getURL() + "'>" + shows[i].getName() + "</a></td></tr>";


    tableString += "<td><a href='" + shows[i].getURL() + "' target="_blank">" + shows[i].getName() + "</a></td></tr>";

    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down DominicDominic
    Posts: 27Member
    Thanks for that!

    Although alas, it does not work. But I suspect this is something to do with the fact that it sits in a wordpress page. Any thoughts? Do I need to add anything to the header?
  • Vote Up0Vote Down DominicDominic
    Posts: 27Member
    Ah, also the schedule widget doesn't seem to work in Chrome. Is this a known issue?

    Edit: oh dear I am getting reports from people that the schedule Widget is just not appearing in the latest Chrome, Firefox or Safari under Win7 or Chrome or Firefox on Ubuntu 10.04.

    Edit 2: It was
    target="_blank Chrome would not load it as an unexpected token.
    Post edited by Dominic at 2012-05-28 10:07:18
  • Just had a chance to look at your site. I incorrectly told you to do it for a different widget before.

    replace on line 226
    '<li>'+(url.length > 0 ? '<a href="'+url+'">'+options.miscText.readMore+'</a>':'')+'</li>'+


    '<li>'+(url.length > 0 ? '<a href="'+url+'" target="_blank">'+options.miscText.readMore+'</a>':'')+'</li>'+
    Post edited by Martin Konecny at 2012-05-28 11:55:21
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down DominicDominic
    Posts: 27Member
    Martin, you total star! That worked. Excellent. Yes. Thanks so much.
  • This hack does not work with the new widget code for some reason?

    Wait, sorry I just needed to clear the cache. I will leave the comment above as a permanent shameful reminder to check everything before shouting for help :)
    Post edited by Dominic at 2012-10-26 08:29:06
  • Reply to @Dominic:

    :D :D

    Also, just a quick reminder to everyone to update their widget after they've upgraded to Airtime 2.2.
    Airtime Pro Hosting: http://airtime.pro
  • how to do the same to today's line up? the syntax is different than the example shown above.