Results 1 to 5 of 5

Thread: How to add url link to fisheye widget images?

  1. #1
    Join Date
    Sep 2006
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How to add url link to fisheye widget images?

    I am using Dojo's Toolkit 0.3.


    I am new to javascripting and webdev in general. This is the sample code I
    am using. How do I make the image open up a url?

    Code:
    
    <div dojoType="FisheyeList"
    	itemWidth="40" itemHeight="40"
    	itemMaxWidth="150" itemMaxHeight="150"
    	orientation="horizontal"
    	effectUnits="2"
    	itemPadding="10"
    	attachEdge="center"
    	labelEdge="bottom"
    >
     
    	<div dojoType="FisheyeListItem"
    		id="item1"
    		onclick="alert('click on' + this.caption + '(from widget id ' +
    this.widgetId + ')!');"
    		caption="Item 1"
    		iconsrc="images/fisheye_1.png">
    	</div>
     
    	<div dojoType="FisheyeListItem"
    		caption="Item 2"
    		iconsrc="images/fisheye_2.png">
     
    	</div>

  2. #2
    Join Date
    Sep 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    newurl = 'http://www.thisweekontheinternet.com';
    window.open(newurl, 'new window', 'resizeable=yes');

    newurl could be a file name, image name or other supported document type.

  3. #3
    Join Date
    Sep 2006
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I'm sorry if I sound dumb. I am using an image. Can you give me an example using the above sample code?

  4. #4
    Join Date
    Sep 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    newurl = 'http://www.yourdomain.com/images/imgname.jpg';
    window.open(newurl, 'new window', 'resizeable=yes');

  5. #5
    Join Date
    Sep 2006
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your help. If possible, I a a bid more. Now that I have gotten the url to open when the image is clicked I need to take it a step further. I have decided to incooperate the greybox effect, ( http://orangoo.com/labs/GreyBox/ ) when the url is lauched. The code that I am using to lauch an url is as follows:

    Code:
    <div dojoType='FisheyeListItem'  
    		iconsrc='images/picturegallery.png' 
    		onclick='window.open("index.html","center");' > 
    		</div>

    The code that make the lighbox effect is as follows:

    Code:
    <a href="http://amix.dk/" onclick="return GB_showFullScreen('amix.dk', 'http://amix.dk/')">Show amix.dk in full screen</a>

    How can I add this code to the fisheye widget.


    P.S. - Basically what I am trying to accomplish is create a site that have a index page with the fisheye widget from dojo. Then the images are linked to subpages. But I don't want just regular popup screen, I want the subpages to load in a lightbox/greybox way.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •