View Full Version : Dynamically Change Size Of Thickbox Window

07-16-2007, 03:25 PM
The thickbox support forum is not very good in terms of getting replies to problems, so I thought I'd attempt a post here.

On Private Air Management (http://www.privateairmanagement.com) I have a thickbox that opens up a form where a user has to type in a password correctly in order to see the content they want. I've managed to get the javascript working nicely as I'd like it too, but is there a way for me to change the size of the thickbox when a link/button us clicked? I'm looking at trying to use the TB_HEIGHT variable in the thickbox js, but as of yet with no luck so I'm not sure it's this I am looking for. I don't have a very extensive knowledge of js at all so I'm completely stumped.

Thanks for any help guys

(The link in question is the one under the "Partial Eclipse 500" header on the left of the page. I have created two links that show and hide the content I use in the form, I just need that thickbox to increase in height when the link/button is clicked)

Javascript File (http://www.privateairmanagement.com/resources/script.js)

07-24-2007, 11:51 AM

C'mon Aero, I'm counting on your genius!

07-24-2007, 11:58 AM
The link to your Javascript file doesn't work.
I am not quite sure what you mean but here is what I should do:

var thinkboxElement = document.getElementById('thinkElementId');
var dynamicWidth = (Fetch the width here, I don't care where it's from)
var dynamicHeight = ...

thinkboxElement.style.width = dynamicWidth;
thinkboxElement.style.height = dynamicHeight;

07-24-2007, 06:00 PM
The link works fine? Strange. Anyways... that's what I have, but the problem I have is that the bit where you have put "(Fetch the width here, I don't care where it's from)" is the exact bit I'm not sure about. I can't seem to call these functions as they are undefined??