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

  • Home
  • SEARCH
  • 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 8297675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:30:12+00:00 2026-06-08T15:30:12+00:00

We have a Java servlet that generates a report. Now we included an option

  • 0

We have a Java servlet that generates a report. Now we included an option to generate a highcharts diagram, containing N highcharts graphs. The diagram should open on a modal element (lightbox, iframe, it doesn’t matter). I used fancybox and displayed the diagram loading in a iframe, but the height and width are all messed up.

It seems that the browser/fancybox is/are calculating the size of the elements of diagram before highcharts renders, and displays the iframe with a small size.

I am not bound to using iframe, though the diagram is called from a servlet URL and it is impossible to know its size beforehand.

I can use another jquery library if that’s the case.

using fancybox 2.0.5, jquery 1.7.2, highcharts 2.2.5

  • 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-06-08T15:30:14+00:00Added an answer on June 8, 2026 at 3:30 pm

    I solved the issue, by changing the highcharts HTML containers from floating divs to a table structure and changing the fancybox mode from iframe to ajax.

    This way fancybox could read the correct size.

    Fancybox was the only one jquery plugin (i tested jqmodal and simplemodal too) I was able to make correctly trigger from the links. The links are dynamically loaded by an ajax call on the page, AFTER the page has loaded.

    This is the code on the $(document).ready( call

    $("a.modalLightbox").fancybox({
    type : 'ajax'
    autoSize : true,
    padding : 5,
    fitToView : true,
    });
    

    The tables had their widths set via inline CSS (not the best, but it had to be done inline since each diagram has its own width calculated by the servlet).

    The all-floats approach were leaving the body element of the iframe with 0 height and inherited width.

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

Sidebar

Related Questions

I have a Java servlet that receives data from an upstream system via a
I have this java servlet that grabs information from a form, I need to
Suppose I have a Java Servlet that takes a while to finish computing it's
I have a legacy Java servlet that is currently running in a Tomcat container.
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
I have developed Java Servlet on Netbeans IDE and now wish to deploy them
I wrote a little Java servlet that would dynamically generate an image button given
I have a Java servlet that connects to a MySQL database. And it is
I have a Java servlet which generates XML, translates it with an XSLT stylesheet,
I have a java servlet api, that when requested, starts a live conversion of

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.