timnosenzo
Apr-09-2009, 08:41 AM
I have 2 custom journal pages that I use for an "About" page and a "Contact" page. I used the advice in this thread to set them up without navigation, etc: http://www.dgrin.com/showthread.php?t=23874
Here's my question. I have a JS hack to make it so the images aren't "clickable" that looks like this:
/*** about page ***/
function doOnLoad() {
if (window.AlbumID && (window.AlbumID == "5905882")) //
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;
divElm = divElm.parentNode;
if (!divElm)
continue;
if (divElm.className.indexOf("photo")<0)
continue;
link.href = "javascript:void(0);";
}
}
Now, I need this applied to both my "Contact" page and my "About" page, so I basically pasted this JS in my JS box twice, using the proper album number. For some reason, it is only working in the "About" page--I can still click on the image in the "Contact" page. Is there a better way for me to do this, that will make it so those images are not clickable? :dunno FWIW, I don't mind if this is applied to ANY Journal page I make on my site, because I would only ever use that style for this sort of thing.
Here's my site:
http://www.timnosenzophoto.com/
Here's the "About" page:
http://www.timnosenzophoto.com/gallery/5905882_uUU7Y
Here's the "Contact" page:
http://www.timnosenzophoto.com/gallery/5910169_KdVAw
Please help, it sort of drives me crazy... especially since my header looks broken when you click on the photo in the "Contact" page. :cry
Ok, part 2, which is less important but it would be cool if I could fix it. Is there anyway to get the top of the text box to line up with the top of the photo (circled in picture below).
27064
Thanks in advance for any help you can offer!!
Tim
Here's my question. I have a JS hack to make it so the images aren't "clickable" that looks like this:
/*** about page ***/
function doOnLoad() {
if (window.AlbumID && (window.AlbumID == "5905882")) //
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;
divElm = divElm.parentNode;
if (!divElm)
continue;
if (divElm.className.indexOf("photo")<0)
continue;
link.href = "javascript:void(0);";
}
}
Now, I need this applied to both my "Contact" page and my "About" page, so I basically pasted this JS in my JS box twice, using the proper album number. For some reason, it is only working in the "About" page--I can still click on the image in the "Contact" page. Is there a better way for me to do this, that will make it so those images are not clickable? :dunno FWIW, I don't mind if this is applied to ANY Journal page I make on my site, because I would only ever use that style for this sort of thing.
Here's my site:
http://www.timnosenzophoto.com/
Here's the "About" page:
http://www.timnosenzophoto.com/gallery/5905882_uUU7Y
Here's the "Contact" page:
http://www.timnosenzophoto.com/gallery/5910169_KdVAw
Please help, it sort of drives me crazy... especially since my header looks broken when you click on the photo in the "Contact" page. :cry
Ok, part 2, which is less important but it would be cool if I could fix it. Is there anyway to get the top of the text box to line up with the top of the photo (circled in picture below).
27064
Thanks in advance for any help you can offer!!
Tim