hmmm, i’ll give the <base> another try and see if it solves it. you said it used to work on ie when you made the wiki article so I’ll try to play with it. do you have an idea maybe what xpix means with using ajax for it?
It seems that the image tag src attribute change is indeed a problem with IE6. See this:
http://www.webdeveloper.com/forum/showthread.php?t=99122
And for a fix, see:
http://www.webdeveloper.com/forum/showthread.php?t=99122&p=695835
So you need to move the showPic function call from the onClick attribute to the href attribute in the link. I originally put the javascript:void(0) intentionally to the href attribute, because that avoids the browser to go to the top of the page on image change.
Don’t know if jQuery or other js libraries have some workaround to this issue.. you might want to try and use jQuery to change the image.. you can use it to create nice trasition on image change while you’re at it.
EDIT: it’s not the <base> url.. and I’m not sure anymore that did it work in IE6 the way it’s in the wiki article, I might of had the js call in the href attribute when testing in IE.. or I used IE7.. sorry.
EDIT2: eg. include jquery to the gallery document and try replacing the js function with:
function showPic(url,title,descr,width,height) {
$("#maxImage").attr({
src: url,
width: width,
height: height
});
$("#maxTitle").html(title);
$("#maxDescr").html(descr);
}
If that works, spice it up with the jQuery enchant transitions
http://ui.jquery.com/enchant/1.0a/demos/
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
xpix, thanks for the input. I’ll look into that and see how it goes.
doze, like always thanks a ton. your replies are always to the point and a great fix. in this particular gallery anyway I don’t have many images and I think it’ll stay that way for a while. I need to look at the jQuery and will post if it worked for me. for now I just change the link in the script and viola its working awesome.
Thanks thanks thanks!
I have the same type of issue in IE6, and after reading Doze’s post on URLs, paths, and the <base>, I took a look at mine to try and troubleshoot. What I found was MaxiGallery is calling all images and CSS with href="/assets/ whereas I’m calling all my images and CSS in the template with href="assets/. The difference is absolute vs. relative paths because of the leading / before the path (href="/). Which is the better method, and where do I change the MaxiGallery path if that is the cause of the problem?
I do have Friendly URLs turned on, and my ’Use friendly alias path’ is set at ’No’, which if I read correctly, would apply the leading / in front of the URLs. For kicks, I’ll change that and see if it makes a difference... and it didn’t.
I also checked the MaxiGallery snippet, and it didn’t seem to have any leading slashes in the code there, so I’m still wondering where that is coming from?
MaxiGallery uses MODx to build the url (via makeUrl() function in document parser class), but the problem is not the URL’s. See my
reply above.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
I read through your reply (even before I posted), but I couldn’t figure out where to add or change the jQuery function that you mentioned. Is that a call coming from MaxiGallery, or is that something within MODx. I’ve seen lot of posts about jQuery, but I don’t know anything about it, so I have not read up on it, or how to use it in MODx.
You need to modify the mgGalleryPicture by doing following..
change:
<a href="javascript:void(0);"
onClick="javascript:showPic('[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]','[+maxigallery.picture.title:htmlent+]','[+maxigallery.picture.descr:htmlent+]',[+maxigallery.picture_width_normal+],[+maxigallery.picture_height_normal+]);return
false;">
to:
<a href="javascript:showPic('[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]','[+maxigallery.picture.title:htmlent+]','[+maxigallery.picture.descr:htmlent+]',[+maxigallery.picture_width_normal+],[+maxigallery.picture_height_normal+])">
"He can have a lollipop any time he wants to. That's what it means to be a programmer."