PDA

View Full Version : removing clickability


DJKennedy
Dec-28-2006, 08:18 PM
I was given this code to remove the ability for someone to click on a gallery:

function doOnLoad()
{
if (window.AlbumID && window.AlbumID == "2257361") //
{
removeLinkFromImg();
}
}

function removeLinkFromImg()
{
var links = document.getElementsByTagName("A");
for (var i = 0; i < links.length; i++)
{
var link = links[i];
var divElm = link.parentNode;
if (!divElm) continue;
if (divElm.className.indexOf("photo")<0) continue;
link.href = "javascript:void(0);";
}
}

If I paste it twice and change the album ID to a different one, only one of these will work - using the code twice for two galleries does not work...is there other code I could use? Or am I needing to change something in the second piece?

Derek

Andy
Dec-28-2006, 08:24 PM
The answer lies in the FAQ:
http://www.dgrin.com/showthread.php?t=26043

#86.

Moved to customization forum.

DJKennedy
Dec-28-2006, 08:30 PM
Thanks Andy:

I persused that long list - must have went right by #86 as I honestly didn't see it!

Derek

EDIT: oh - uhm, will that allow me to use it on more than 1 journal ?


The answer lies in the FAQ:
http://www.dgrin.com/showthread.php?t=26043

#86.

Moved to customization forum.

Andy
Dec-28-2006, 08:33 PM
Thanks Andy:

I persused that long list - must have went right by #86 as I honestly didn't see it!

Derek

EDIT: oh - uhm, will that allow me to use it on more than 1 journal ?It's in the thread, how to do multiple galleries. You just have to read the thread and find it. :evil

Andy
Dec-28-2006, 08:34 PM
It's in the thread, how to do multiple galleries. You just have to read the thread and find it. :evil
Honestly, I'm not being cute here. Either I read it, and find it, or you do, thanks :D

DJKennedy
Dec-28-2006, 08:40 PM
Honestly, I'm not being cute here. Either I read it, and find it, or you do, thanks :D

Hah! Thanks Andy:

The link from #86 brought me to one page, no page before/after until I clicked on the top right hand corner - that brought me the rest of the thread. I'm just a 'touch' slow tonight. I thought the one page was all there was!

Derek