Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 834775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:43:30+00:00 2026-05-15T04:43:30+00:00

Am currently working on a site that uses a lot of cfwindow objects and

  • 0

Am currently working on a site that uses a lot of cfwindow objects and I was wondering if anyone knows of a way to dynamically resize the window so that all the content fits in without the need for scroll bars.

I have tried using the overflow=visible configuration but it doesnt seem to make a difference.

Thanks in advance for any advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:43:31+00:00Added an answer on May 15, 2026 at 4:43 am

    Well, this is kind of classic task when using pop-ups for displaying images. It was done by measuring the image size and resizing spawned window using window.resizeBy(w,h). This is still applicable method, I think.

    Second similar option is calculating the needed size on the server-side and passing to the cfwindow attributes width and height. Say, you can capture the content into the cfcontent and check its length in characters.

    Please note that both these methods are not reliable when you are working with text content, because rendering the fonts can be really different for users. So, reserving some additional height can be useful.

    Other tricky way is to check if scrollbars are present, for already opened window. There’s an attribute scrollHeight which you can compare with clientHeight and increase the height. This can possibly produce some ugly “jumping” effects in some browsers, but it should work.

    I was interested and tried quick test of last method. First spawned pop-up with w/h=200 and this answer text (words above) as contents. Next I did this in pop-up window:

    <script type="text/javascript">
    window.onload = function() {
    
        // check the size before resize
        alert("Window Width = " + window.innerWidth + "\nWindow Height = " + window.innerHeight + "\nScrollHeight =  " + document.body.scrollHeight);
    
        if (window.innerHeight < document.body.scrollHeight) {
            // here's where we can play with resize steps and other specific trickery
            // now we're trying to expand size a bit
            window.resizeBy(window.innerWidth + 50, window.innerHeight + 50);
        }
    
        // check the size after resize
        alert("Window Width = " + window.innerWidth + "\nWindow Height = " + window.innerHeight + "\nScrollHeight =  " + document.body.scrollHeight);
    
    }
    </script>
    

    Alert #1:

    Window Width = 200
    Window Height = 200
    ScrollHeight =  783
    

    Alert #2:

    Window Width = 450
    Window Height = 450
    ScrollHeight =  358
    

    Please note that I’m not 100% sure (and can not check right now) that window.innerWidth/Height attributes will work in IE — you should consider also document.documentElement.clientWidth/Height attributes.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a site that uses a slider at some point, but
I'm currently working on a site that uses ajax to load the content into
Im currently working on a site that you can upload large files.. on local
I'm currently working on a web site that will show kind a image gallery
I'm working on a site that sells various products. Currently we're presenting those products
I'm currently working on a jQuery script that will translate the site's text into
I am working with a site that uses an outside source to work with
I am currently working on a site that includes javascript code that we get
I'm working on a site that uses Google Analytics. On most of the pages
I am currently working on a web application that uses PHP and MySQL, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.