Post Reply 
Thread Rating:
  • 1 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change properties of dojox.image.Lightbox widget
02-02-2011, 10:19 AM
Post: #1
Change properties of dojox.image.Lightbox widget
I have one big picture on page and couple of thumbnails below it. I attached Lightbox to big picture like this:

<a id="productMainImageLB" dojoType="dojox.image.Lightbox" href="pathToImage">
<img id="productMainImage" src="pathToImage" width="300"/>
There is js function which replaces big picture with one from thumbnail when its clicked that looks like this:

function changeThumbNail(angleImgId,imgsrc){
if (currentAngleImgId != "") { document.getElementById(currentAngleImgId).className ='off';
currentAngleImgId = angleImgId;
document.getElementById(angleImgId).className ='on'; document.getElementById("productMainImage").src = imgsrc;

so i figured out that for my lightbox to work correctly i need to update href attribute on widget when picture inside is updated. I add following line to my function:

dojo.byId("productMainImageLB").setAttribute("href", imgsrc);
it seems to work(i see changed url on page when i use IE dev. toolbar) but when i click on it, it still show the same picture and not the actual one. Is there any need to update that widget somehow or refresh it? CouldnĀ“t find any help on this...
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

Send your comments, Suggestions or Queries regarding this site at

Copyright © 2010 All Rights Reserved