Go To Content
codylindley.com

codylindley.com

ThickBox 1.2

Here it is! ThickBox 1.2!

For those of you who were hoping that I would include the next and previous functionality (image grouping) in this version I regretfully inform you that you will have to wait until the next version.

Change log:

  • Added the ability to use inline div elements to populate a ThickBox
  • Added the ability to use uppercase and lowercase extensions
  • Loading animation centers on the screen regardless of vertical scroll
  • In IE, select boxes are now hidden when ThickBox is open
  • Fixed a bug that occurs when no title is used on anchor elements
  • Fixed overlay so that it covers the screen during the loading animation (occurred in FF and Opera)
  • Uses the new jQuery 1.0 – Alpha Release

Upgrading – Make sure to replace the thickbox.js file, CSS file, and JQuery file.

 
  1.   #1 Comment Posted by Wesley Walser on Jul 5, 10:12 AM

    This isn’t working for me in Safari or FF for me. I think that FF is my fault because it works on every other FF install other than mine. Safari on the other hand may be a larger problem.

  2.   #2 Author Comment on Jul 5, 10:20 AM

    @Wesley – Thank you, I believe I fixed the issue. Try Safari again.

  3.   #3 Comment Posted by Wesley Walser on Jul 5, 10:35 AM

    Yup, not sure if you actually had to change anything or if it was just my cache, but that fixed it.

    Also a general note I figured out why it wasn’t working in my installation of FF. my finding sucks for me but shouldn’t affect anyone else.

  4.   #4 Comment Posted by jkrebs on Jul 5, 01:31 PM

    thank you for all your hard work on this!

  5.   #5 Comment Posted by JMG on Jul 5, 03:02 PM

    When you click the link to the picture of your son the screen doesn’t get gray. When you scroll to the top of the page you see that the page is grayed there but not on the bottom of the page.

    Thank for all your hard work!

  6.   #6 Comment Posted by JMG on Jul 5, 03:05 PM

    The thing I mentioned in comment #5 occours in firefox, not IE.

  7.   #7 Author Comment on Jul 5, 03:06 PM

    @JMG – Yup, seems to be an issue with FF. I’ll see if I can’t get it fixed on the next version.

  8.   #8 Comment Posted by JMG on Jul 5, 03:21 PM

    I noticed another thing in firefox. When the thickbox window opens it does that by first showing the complete window (really fast) and then doing the slidedown effect.

  9.   #9 Author Comment on Jul 5, 03:24 PM

    @JMG – Yup, I’m waiting to hear back from John (jquery creator) on this issue.

  10.   #10 Comment Posted by JMG on Jul 5, 04:27 PM

    I dont know if this will help but if you use the latest jquery with thickbox 1.1 you dont have the problem that i described in comment #8 but instead you have a another problem. When the windows is opened it first seems to be vertically aligned to the right. Maybe this will help you debug thickbox/jquery.

  11.   #11 Author Comment on Jul 5, 04:31 PM

    @All – I added a fix for the overlay. It will now cover the entire screen when loading. As well, if you want to get rid of the flicker in FF for Thickbox just change the .slidedown(); calls to .css({display:�block�});.

  12.   #12 Comment Posted by SugarDaddy on Jul 6, 04:19 AM

    if I can ask you some help because I don’t understand why it doesn’t works for me on FF (but your example works on my server) but works on IE… I can give you the code (under zope).

  13.   #13 Comment Posted by JMG on Jul 6, 09:49 AM

    It seems like you also could use fadeIn(“slow”) instead of .slidedown() without the flicker.

  14.   #14 Comment Posted by Rich on Jul 6, 01:03 PM

    I still have a issue with example and Safari 1.1, – Error: 1428 Type Error, Value Undefined Result of Expression of XMLHttpRequest. Any insite on this, thanks Rich

  15.   #15 Comment Posted by jkrebs on Jul 6, 01:12 PM

    “just change the .slidedown(); calls to .css({display:â€?blockâ€?});”
    sweet. thanks!

    FYI fadeIn(“slow”) as mentioned by JMG did not work for me

  16.   #16 Comment Posted by SugarDaddy on Jul 6, 02:52 PM

    nothing new, I don’t understand why the example works and not my page under FF.

  17.   #17 Comment Posted by ichik on Jul 6, 02:55 PM

    Well, I don’t know, maybe it’s just my problem. But in Opera 9.01 1.2 works much slower than 1.1.

  18.   #18 Comment Posted by SugarDaddy on Jul 6, 03:24 PM

    it works now !
    very strange, it sounds like not founding jquery.js but only with FF.
    I’d replaced the js call to the last one on the jquery server (http://jquery.com/src/latest/) and it works now.
    I’ll remove this link and try finding why the jquery.js is not loader under FF.

  19.   #19 Comment Posted by JMG on Jul 6, 03:37 PM

    I’ve discovered another problem with Thickbox in Firefox. Sometimes when I click on an image the loading screen comes up but the window/image doesn’t. The loading animation just continues until I abort it. Maybe it has something to do with how Firefox handles the onload event!? I sure the picture have been loaded because when I abort the loading and clicks on the image again it loads from the cache. This problem appeared in Thickbox 1.1 also but it feels like it happens more often now. In IE the images are loaded correctly every time.

  20.   #20 Author Comment on Jul 7, 06:48 AM

    @Rich – Sorry, I have not been testing safari 1.1.

    @JMG – FF seems to be causing several issues. I am trying to figure this out myself but the inconsistency of the issue is making it difficult. At times, it seems in Firefox the image simply does not come up and a person must abort the overlay. Other times, you click on an image and the image is opened up as if ThickBox was never created. This issue only seems specific to FF too. At any rate, I’m trying to get to the bottom of the issue. Any insight would be helpful.

  21.   #21 Comment Posted by Han on Jul 7, 09:03 AM

    As mentioned before it doesnt seem to work in FF. But I also noticed that select boxes are still NOT hidden in IE. Hope you can fix all the issues. Thickbox pwns :D

  22.   #22 Author Comment on Jul 7, 09:25 AM

    @Hans – In IE 6 using my demo page Thickbox hides the form elements appropriately. Also, using my demo, and besides the issues already mention, FF functions just fine. Of courese if you are speaking about the issues mentioned, then yes FF does have some issues.

  23.   #23 Comment Posted by Kai on Jul 7, 05:38 PM

    I’ve noticed an issue in verson 8.5 of Opera as well. Opera seems to load the pages with the thickbox scripts okay but when you click on an image to start the slideshow effect the page pops up blank and nothing happens. Anyone else have this problem or is it just on my two computers. Maybe Opera 9 is okay?

  24.   #24 Comment Posted by Jake on Jul 8, 03:07 AM

    I’m getting a script bug in IE. Here is the situation:

    I am loading in a PHP file to the lightbox. This PHP file has an empty ‘div’ and ‘script’ tag. Inside the ‘script’ tag I make a function call. It works fine in FF and Safari, but IE refuses to make the function call UNTIL I add some sort of text (that the browser displays) in the PHP file thickbox loads in.

    I made a quick fix by adding a div with id=”iefix”, adding some text and then removing that div (via JS) so that text won’t show up in the final result.

    The end result is a working file, but I’m still getting some weird graphic errors.

    See here:
    http://www.indieed.com

    (click on the only link)

    Any ideas as to why this bug popped up or why I’m getting the graphic glitches in IE would be much appreciated :)

    Thanks
    -Jake

  25.   #25 Comment Posted by Dave on Jul 9, 11:12 AM

    Is there anyway to call the thickbox from a javascript call rather then an href? I need to be able to call the thinkbox from innerHTML.. as it is now it does not work. Thanks!

  26.   #26 Author Comment on Jul 10, 09:43 AM

    @Dave – Here is the function you call.

    TB_show(caption, url);

  27.   #27 Comment Posted by Johan on Jul 10, 03:07 PM

    To fix the overlay not covering the entire page in Moz FF I used:

    min-height:100%; height: auto; _height:100% on the overlay

  28.   #28 Comment Posted by Johan on Jul 10, 03:09 PM

    Also when an image wont load , the user should be informed, with image.onerror

  29.   #29 Author Comment on Jul 10, 03:12 PM

    @Johan – I did not know this was an issue in the new version. Can you give a little more detail on why this change is necessary?

    Also, not a bad idea about the error thing.

  30.   #30 Comment Posted by Johan on Jul 10, 03:31 PM

    To fix the overlay not covering the entire page I in Moz FF I used:

    min-height:100%; height: auto; _height:100% on the overlay

    You seemed to have fixed it with JS, I tried to do it with CSS in the earlier version.

  31.   #31 Comment Posted by SJB on Jul 10, 04:39 PM

    Hi, as with comments #1/#3 i cannot seem to get version 1.2 to work in one of my installs of FF any ideas on how to solve this or why it might be.

    Also due to use of filter: within the CSS you wont be able to validate.

    All in all me thinks a great little piece o kit.

  32.   #32 Comment Posted by Johan on Jul 11, 03:42 AM

    for validation (IE WIN)

    * html #TB_overlay { height:100% }

  33.   #33 Comment Posted by lw on Jul 11, 10:35 AM

    I am trying to use this with a url which has query string parameters of its own. The overlay and gif come up but the page never does. Is this possible? What do I need to change?

    Thanks

  34.   #34 Comment Posted by SJB on Jul 11, 01:19 PM

    Hi, solved the FF issue as in #31 its a norton issue, sorry to waste your time, will try the *html, cheers for that.

  35.   #35 Comment Posted by Rachel on Jul 11, 11:11 PM

    LW – instead of pasting in the ?height=n&width=n, instead paste in &height=n&width=n after your string parameters.

    If anyone can help me though with another problem… the css of the new “linked to” page is conflicting with the css of the “parent page” because of attributes with the same naming conventions or properties. Is there some magical Javascript way of doing it so that it only applies the css of the new page into the Thickbox page and not conflict? I can’t change the css and rename everything, as I am using the thickbox for a css template previewing.

  36.   #36 Comment Posted by Gary Hides on Jul 12, 05:20 AM

    I have some really long pages, and if you go so far down the pages, the script stops working and seems to open the larger image in a new window or the same window at random. Strange one!

    Thanks for the hard work – lovely script!

  37.   #37 Comment Posted by adam tracksler on Jul 12, 12:03 PM

    I’m working on a workaround for PHP pages.

    Here is my logic, I can get the PHP page to parse the data and load it into an inline div. I can hide the div (like in the example) and call it via a link.

    This all works, but when I get the error:
    Type Error:o.getAttribute is not a function.

    Am I doing something wrong??

  38.   #38 Comment Posted by adam tracksler on Jul 12, 12:17 PM

    forget my last message, I just linked to a PHP page and it works fine…as usual I was way over engineering it.

  39.   #39 Comment Posted by mco on Jul 12, 02:57 PM

    Hi,

    ThickBox 1.2 (the demo) doesn’t work with Opera 8.54: There is only a white space on the page. You have to scroll down to see the black background and the box.

    LightBox 1.0 worked fine with Opera 8.54 (with a solid black background, since Opera didn’t support opacity since version 9).

    Any idea how to fix it?

    Thanks,
    mco

    Btw.: Works fine in Opera 9, IE6, IE7 Beta 3, FF 1.5 (all on Win XP). Thanks for the great work!

  40.   #40 Comment Posted by psy on Jul 12, 07:19 PM

    Hi
    SBJ – I use FF and norton too and this demo doesnt work. What was the fix? BTW it works great in IE6. Nice.
    thx

  41.   #41 Comment Posted by kevin murray on Jul 18, 03:02 PM

    First off, very nice..
    However, as with a few others I’m having Opera 8.5.4 issues (displays white box on click)and with FF (lateset, both Mac and PC). Sporadically FF will load thmb to display the full-sized image but, not with any reliability. Trying your v1.2 I get similar results. I did note that when I do a page refresh the first instance of thmb-click always works.
    It’s no huge issue that it breaks in Opera and, I’m thankfull it works perfectly in IE7 (as it’s usually bass-ackwards) but, FF is my baby and I oh-so-badly want it to work in FF.

  42.   #42 Comment Posted by Gareth Osborne on Jul 21, 08:00 AM

    I may be going a little technical here but has anyone been able to get Thickbox 1.2 working alongside ASP.NET 2.0 Atlas components, specifically Update Panel? I get a document.onload object null error? Great tool asides from that. Cheers for now.

  43.   #43 Comment Posted by camiman on Jul 22, 02:50 AM

    Anyone get v1.2 to work with Camino? Neverending preloader, weird messages when trying the demo. Example when clicking on http://jquery.com/demo/thickbox/ajaxOverFlow.htm?height=300&width=300 – You get a dropdown saying: http://jquery.com – ReferenceError: ActiveXObject is not defined and you get the infinite preloader also. Behaves very strange, no problems with previous release. Great script otherwise!

  44.   #44 Author Comment on Jul 24, 09:53 AM

    @all – The FF issue which does not allow a thickbox to open the first time its clicked can be fixed by removing the “var” in front of “imgPreloader = new Image();” in the js file.

  45.   #45 Comment Posted by Wes Plunk on Jul 24, 03:11 PM

    Getting error in Safari when loading an aspx file.

    Error:
    TypeError – Value undefined (result of expression o.getAttribute) is not object

  46.   #46 Comment Posted by Florian Hofmann on Jul 25, 03:10 AM

    Same Error here, Firefox and Safari:

    TypeError: o.getAttribute is not a function (Firefox)

    and
    TypeError – Value undefined (result of expression o.getAttribute) is not object (Safari)...

    Any Idea? Thank you!

  47.   #47 Comment Posted by Florian Hofmann on Jul 25, 03:15 AM

    ThickBox with scrolling content, ThickBox with no scrolling content. ThickBox login – working fine, but inline divs NOT – I get the above error… :-) Thank you for your help.

  48.   #48 Author Comment on Jul 25, 04:29 AM

    @Florian – Based on my demo I can not get the error to occur on a Mac or PC using FF or Safari.

  49.   #49 Comment Posted by Wes Plunk on Jul 25, 03:31 PM

    Found the problem..bug in jquery using the setAttribute for all browsers. It should be using setProperty for Opera, Safari, & Mozilla

  50.   #50 Comment Posted by aaron on Jul 25, 03:35 PM

    i have thickbox running on my site and there is an embedded quicktime file on the main page, when i use a thickbox to open up a video in an html page i can’t see it, the video from the main page shows right through the popup window. does anyone have a fix?

  51.   #51 Comment Posted by Mike on Jul 27, 06:55 AM

    Anyone experiencing problems with images in IE not showing? It’s very likely my sloppy coding but wondered if anyone else had this problem and solved it?

    I load up example.php into a thickbox layer, the text displays fine but no images are shown. Works in FF and Safari.

  52.   #52 Comment Posted by Rick Baskett on Jul 27, 07:33 AM

    I had to modify both the script and jquery to get it to work with moo.ajax.. anyway that can be default? I just changed all occurences of $ with $$

  53.   #53 Comment Posted by Rick Baskett on Jul 27, 07:36 AM

    Oh I forgot to mention.. on one of my pages.. there is a section on the page that the overlay does not.. well.. overlay.. it’s really strange.. it’s about 500px x 450px at the bottom of my really long page.

  54.   #54 Comment Posted by Mike on Jul 28, 07:13 AM

    Found out the problem to the missing images. I was using sleight.js from Youngpup (to get png support in PC IE 6), this caused me problems with the thickbox script.

    On a seperate issue, I get a box appear in the bottom left when the overlay appears. Anyone else get this?

  55.   #55 Comment Posted by Dee on Jul 28, 04:46 PM

    How do you adjust the click area for the layer to go away;
    I dont want the user to click on the grey area and for it to go away, Just a close link inside the white area.?
    thanks

  56.   #56 Comment Posted by john on Aug 1, 07:17 AM

    Not working on FF installs now!!

  57.   #57 Author Comment on Aug 1, 07:23 AM

    @John – The demo works in my updated version of FF. Can you be a little more specific. Also, have you read this comment.

  58.   #58 Comment Posted by John on Aug 1, 09:50 AM

    On ff I everything just functions as normal links. I’ve tried various things, uninstalling extensions etc. but it’s still not working. I hate to say this but it did work OK yesterday. And on my local version of your download it works fine in FF – when I publish this to the web is when I hit the problem or when I view your webpage. I’ve tested this on WINXP and on WIN2K (older FF version) with the same issues.

  59.   #59 Comment Posted by Marcel on Aug 1, 03:49 PM

    Lightbox 2.02 offers the option to have some kind of gallery, if called with lightbox[name].

    so, all pics with this are bundles together as a gallery.
    Does Thickbox offers this option??

    Greetings

    marcel

  60.   #60 Author Comment on Aug 1, 05:26 PM

    @Marcel – Should be releasing this functionality this week or next.

  61.   #61 Comment Posted by Matt on Aug 2, 09:27 AM

    I can’t seem to get a popup dhtml/js calendar to work within thickbox. Any clues as to why? I assume it is either not loading the needed scripts or is ignoring anything in the script tags.

    Any help would be greatly appreciated.

  62.   #62 Comment Posted by Matt on Aug 2, 11:04 AM

    Cody
    Originally used inline, but it threw me an error: Type: e[pro[p]] is not a function or something like that.

    I then added .rhtml as an allowed file type (working on a ruby app) and called it via AJAX.

    In neither method did the calendar work.

  63.   #63 Comment Posted by Paul W on Aug 2, 11:43 PM

    I learnt something today while implementing this FINE script on my site.

    FF won’t load JS with the following
    < script type="text/javascript" src="thickbox.js" / >

    but will load with the following
    < script type="text/javascript" src="thickbox.js" >< / script >

    ( I’ve had to place in some spaces so it will display here :) )

  64.   #64 Author Comment on Aug 3, 09:36 AM

    @All – ThickBox 2.0 has been released! http://jquery.com/demo/thickbox/

  65.   #65 Comment Posted by Luc W on Aug 3, 12:35 PM

    Already mentioned in Comment 42, but it seems thickbox is not working alongside MS Atlas (especially UpdatePanel). To what I found so far, the jquery library gets not loaded correctly because of Atlas.
    Somebody any suggestions?

  66.   #66 Comment Posted by QPMEDIA on Aug 3, 01:20 PM

    Hi! First i want to say that i am a addicted user of thickbox since i had found it :) Great work !!!

    Well, i have only one little problem and question:

    01 Problem: I have an image which i open with thickbox. This image is image is very big. And i use an Flashlogo on the left-top of the page. When i opening the image with thickbox, it shows the flashheader not behind the thickbox window, it shows in front of the thickbox window.
    -> See this screenshot at: http://qpmedia.qp.ohost.de/thickbox.JPG

    ###

    02 Question: Can i use for the close and priv – next link an image like in lightbox ?

    ###

    Greets QPMEDIA

  67.   #67 Comment Posted by QPMEDIA on Aug 3, 01:34 PM

    Ehehe have forgot a question :P

    I have made an login window with thickbox. Well, when i enter the right username and pass its redirect me to the adminmenü. Now i want, that when i give a wrong pass and username, that i become an error message IN THE Thickbox Login window. How i can make this ? Need held :)

  68.   #68 Comment Posted by Rick Baskett on Aug 3, 01:50 PM

    Hey Awesome with the 2.0.. I can’t wait to try it out, thanks for your hard work! Should we still make comments here or will there be another post to comment on the new version? Thanks again for such an awesome script!

  69.   #69 Comment Posted by Rick Baskett on Aug 3, 02:05 PM

    QPMEDIA: No that functionality is not available… yet. It does sound like he’s going to put it in one of these days :)

  70.   #70 Comment Posted by QPMEDIA on Aug 3, 02:25 PM

    @ Rick Baskett: Hi :) Which of my questions do you mean ? :)

    Eh.. cant make a gallery… with image maps… damn. Can anyone help me :)

  71.   #71 Author Comment on Aug 3, 03:02 PM

    @All – Please use the new forum to discuss ThickBox 2.0.

    http://codylindley.com/thickboxforum/

  72.   #72 Comment Posted by Omar on Nov 15, 11:55 AM

    I’m using the iframe functionality of ThickBox, and am trying to link to different anchor tags on a page. In IE it works fine, but in Firefox it loads the page in the iframe, but doesn’t go to the anchor tags, which makes it useless for me. Is there some function I need to add to Thickbox.js to make firefox see the anchor tag and go to it in the iframe?

  73.   #73 Comment Posted by arnaud on Nov 30, 06:18 AM

    is it possible to have thickbox open in the parent window of the iframe it’s placed in? (Thickbox in iframe, thickbox content open in iframe parent and over said iframe). I’m able to do this with lightbox 2.0 but I need Thickboxe’s content flexibility.
    Thanks in advance for any help on this.

  74.   #74 Comment Posted by Bijo on Jun 25, 06:40 AM

    Can we open a new thickbox by clicking on a link in the previous thickbox.

  75.   #75 Comment Posted by judy on Oct 4, 01:20 AM

    Can anyone help? How can we open a thickbox from an iframe and have it act as if it were opened from the parent window? We have seen many similar questions in a few differant forums but seen no working solutions. We have tried the _parent and _top target attribures – no success. We have tried linking to the parent window and running the thickbox javascript from the parent windows head – no success. Has anyone made this functionality work or perhaps, is it just not possible. Thanks in advance for anyone giving this question some consideration!!

  76.   #76 Comment Posted by Ashish on Oct 9, 11:49 PM

    Hi,
    I want to pass a parameter in thickbox url..
    like this ..
    TB_show(‘Login to Continue’,‘login_box.php?return=posting.php?f=2&g=5&amp;height=170&amp;width=250’,null);

    thickbox is taking only 1 parameter. i want to pass more than 1 parameter..
    how is it possible??
    Please help ..
    Thanks
    Ashish.

  77.   #77 Comment Posted by Web Tasarımı on Oct 16, 09:20 AM

    Thank you all informations.