[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [syndication] Javscript links and NewsReaders



Rick Bradley wrote:
> * Joel Chippindale (joel.chippindale@bbc.co.uk) [040614 04:56]:
>
>>We have recently changed the way that AV plays on the BBC Sport site. This
>>means that all links to AV use javascript to ensure they open at the right
size
>>etc. For example
>>
>><A href="#"
onclick='clickmain=window.open("http://www.bbc.co.uk/mediaselector/
>>check/sol/ukfs_sport/hi/av?redirect=fs.stm&nbram=1&bbram=1&nbwm=1&bbwm=1&news=1
>>&nol_storyid=3803639","console","toolbar=0,location=0,status=0,menubar=
>>0,scrollbars=0,resizable=0,width=681,height=487")'>Link to example AV</A>
>>
>>We would like to provide links to this AV in feeds for NewsReaders. Is there a
>>standard way for including these 'javascript' links in feeds for NewsReaders?
>
>
> Why not instead link to a page which has an onLoad() Javascript handler
> which does the right thing?

That will run you into a problem with pop-up blockers.

I'm not a big fan of forced pop-up windows - they remove control from
the user. For instance, I'm denied the choice of opening the page in a
new tab.

Bill Kearney points out that Javascript in aggregators is frowned on.
The platypus attack is an excellent demonstration of why.

I'd recommend the following syntax - which allows the positives of both
of the above points:

<a
href="http://www.bbc.co.uk/mediaselector/check/sol/ukfs_sport/hi/av?redirect=fs.stm&amp;nbram=1&amp;bbram=1&amp;nbwm=1&amp;bbwm=1&amp;news=1&amp;nol_storyid=3803639";

target="console"
onclick="window.open(this.href,this.target,'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=681,height=487')">Link

to example Audio Visual</a>

The benefits of the above is that it can be overriden by the user at
their choice, whilst also not preventing things from working in a pop-up
blocking environment.

It also allows well-authored aggregators to cut out javascript and still
leave a URL thats useful to the reader.

Those people comfortable with running scripts in their aggregator will
get your content as you intend it. Those people who prefer no scriping
in their aggregator have that choice.