To make life easier this site has been walrss'd - click here to visit http://porkandpaws.walrss.com

qrcode -containing url of this post

Whilst working this morning I wrote this piece of javascript for unobtrusively changing a parent window location from a clickable map


function map()
{
if (!document.getElementsByTagName) return false;
if (!document.getElementById) return false;

var mapLinks = document.getElementsByTagName(”area”);
for (var i = 0; i < mapLinks.length; i++)
{

if(mapLinks[i].className==’getform’)
{

mapLinks[i].onclick=function()
{
var destination= this.getAttribute(’href’);

openform(destination);
return false;
}
}

}

}

function openform(destination)
{
this.opener.location.href=destination;
this.close();
return false;

}

But it just occurred to me is this, although unobstrusively written, obtrusive to control other windows? Is this accessible (would a screen reader be notified ?)
I think I need to check before I unleash this.

Technorati Tags: , , ,

Posted Friday, February 23rd, 2007 at 8:07 am
Filed Under Category: Technical
You can leave a response, or trackback from your own site.

0

Leave a Reply