Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts

    Dynamically Change Size Of Thickbox Window

    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 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
    Last edited by ahallicks; 07-16-2007 at 02:47 PM.
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    *bump*

    C'mon Aero, I'm counting on your genius!
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #3
    New Coder
    Join Date
    Jul 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The link to your Javascript file doesn't work.
    I am not quite sure what you mean but here is what I should do:

    Code:
    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;
    Last edited by Codestar; 07-24-2007 at 11:02 AM.

  • #4
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    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??
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools


  •  

    Posting Permissions

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