Results 1 to 10 of 10

Thread: Image Thumbnail Viewer doesn't work in IE

  1. #1
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Image Thumbnail Viewer doesn't work in IE

    1) Script Title:
    Image Thumbnail Viewer

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

    3) Describe problem:
    I noticed that the script doesn't work in IE.
    First, even when I went to the original page it didn't work (with IE). For some strange reason 5 minutes later it did. On my page it still doesn't work however. In FF all is fine. Any ideas?

    Here is the link: http://www.tc.umn.edu/~hosse011/New%...o/grasses.html
    The albums are a little ugly (I am working on it) but the images don't open regardless...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sounds like IE's bug of not firing the "onload" event for images. Inside the .js file, this should have been taken care of already with the code:

    Code:
    if (document.all && !window.createPopup) //Target IE5.0 browsers only. Address IE image cache not firing onload bug: panoramio.com/blog/onload-event/
    this.featureImage.src=link.getAttribute("href")
    However, perhaps it's not 100% fail safe. Try finding the lines:

    Code:
    this.featureImage.onload=function(){ //When target image has completely loaded
    thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div
    thumbnailviewer.showthumbBox() //Display "thumbbox" div to the world!
    }
    inside the script, and replace that with:

    Code:
    if (this.featureImage.complete){
    thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div
    thumbnailviewer.showthumbBox() //Display "thumbbox" div to the world!
    }
    else{
    this.featureImage.onload=function(){ //When target image has completely loaded
    thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div
    thumbnailviewer.showthumbBox() //Display "thumbbox" div to the world!
    }
    }

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    kotkoda (07-07-2008)

  4. #3
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Talking Thank you!

    IT WORKED!

    THANK YOU!!!

    You are a genius!

  5. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You're welcome. BTW, I've updated the script officially with the changes as well.

  6. #5
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    i am using the same css & javascript as Kotkoda. i am also having problems with the javascript not working in IE or even in FF. when the thumbnail is clicked on, the image does not display properly; instead, it displays without a border_and_in another window to boot! I tried using the updated script but i can't get it to work. i am using yahoo's geocities where you can upload and have your own site (forgive me if you already know about Geocities). in the File Manager, when i "preview" the webpage that has the pop-up viewer, the viewer works fine, but then when i go to my page's url, it doesn't.

    www.geocities.com/nicholeedralin

    please help. if you need any more info like the individual html pages let me know. sorry, i am woefully a layman at this. also, if this helps, i created the site in Dreamweaver (where everything worked splendidly) and then uploaded the web files into Geocities.

    thanks...nichole
    Last edited by nicholeje; 07-10-2008 at 04:53 AM. Reason: added more info and corrected spelling

  7. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You really need to get another host. Geocities messes with your pages too much for this script to work. It adds scripts (lots of hosts, particularly free ones do that) and also enframes your page (not too many hosts do that). In addition to enframing your page, it has added the Image Thumbnail Viewer script to it a second time. I'm reasonably sure this or some of the scripts Geocities adds is causing the problem because in the Opera browser, which for some reason doesn't allow Geocities to enframe the page or add many (if any scripts), the script is working fine.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #7
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    whoa, what a swift response! thanks much. what hosts would you recommend? are there any free ones that don't mess with your code do you know? would i be able to make it work in Geocities by deleting some of its code or is that just plain trouble for the asking? any thoughts would be much appreciated.

    thanks again!

    nichole

  9. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I do not personally recommend any free hosts because I have no experience with good ones (My ISP provides workable free web space for my personal projects, all paid work I do is for folks who have paid hosts). I would stay away from freewebs, tripod, and geocities, as most of the complaints about scripts here that end up having been caused by the host are from those three.

    Also avoid MySpace and similar sites that have rigidly preformatted looks that are difficult to customize, really any host that will not allow you to upload your work directly via ftp.

    Things to avoid are hosts that put your page in a frame or iframe, and/or that add their own ads and scripts to your pages.

    Although you may not care about it now, PHP availability can be really useful down the road for a variety of things, but it isn't essential unless you want/need it now.

    The more bandwidth and disk space and the less restrictions, the better.

    With all that in mind, and with an eye to any specific requirements you might have, you can look through these results carefully and probably come up with at least a few viable options:

    http://www.google.com/search?hl=en&l...st&btnG=Search

    In the past I have had some luck with getting scripts to run on hosts like Geocities. However, Geocities has gotten worse over time, while the scripts offered here on DD have become more resistant to being messed with by host scripts. As a result, it is less likely to be workable, while in the long run you will most likely be happier with a better host anyway.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #9
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Still issues with this script in ie...

    Hi Everyone,

    There appears to still be an issue with this script in ie. I've incorporated the latest vesion of the .js and css file into my page and I still get the image opening in a new tab. The only way I can remotely get it to work is to hold the shift key down, however this still opens an image in the new tab!

    ARRRGGG!

    (It works fine in FF and when on a test page with nothing but the a test link and the "rel" attribute.

    If anyone can help it would be most appreciated as I'm completely stumped on this one!!!!!!!!

    Here is the page in question (only in testing form): http://www.thebentspoon.com.au/cupcakes.html

    Cheers
    Last edited by james005; 08-21-2008 at 01:39 PM. Reason: Link

  11. #10
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I may be wrong here (someone with greater knowledge can confirm) but I think you may have the "rel=thumbnail" parameter in the wrong place?

    Try amending this line in your HTML .......

    <a rel="thumbnail" title="Cupcake Bouquets - Large Bows" href="images/bouquets/flower-bows-large.jpg">

    To read ....

    <a href="images/bouquets/flower-bows-large.jpg" rel="thumbnail" title="Cupcake Bouquets - Large Bows">

    Having said that I'm not sure why your version worked fine in FF.

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
  •