preload image from external file (html)

  • I have a textfield and loading information from an external file. The images are not showing up quickly, so after the textfield is loaded, the image will show up. Is it possible to preload the images or something? Or is it possible to show the textfield when the image is fully loaded (which is less responsive of course :()?

    The image also loads slow when it's already loaded.

    Another question: how can I get autoheight working? The textfield is a 'standard' height (around 300 pixels?) and autoheight does not work at all :(. Here is my code:


    (a trace shows me the height is null:
    trace("Height = ", get(plugin[showinfo].height));
    )

    Edited 4 times, last by maaike (February 15, 2014 at 6:41 PM).

  • Ok nice. I thought it would be a good idea to upgrade to a higher krpano version, so I updated to 16.9. Now my images are not showing anymore at all. Nothing changed to the code.
    :(
    Any ideas?

    My data file looks like this:

    Code
    <data name="data2" val="data2">
            <img src="images/info02.jpg" style="float:left; padding: 8px;" />
            <br /><br />Rear side access main power connection (middle left side) and 
            main air and vacuum supply (bottom left).
      </data>
  • Ok, Tuur showed me how to solve this bug of the not-showing images: When I add a <br /> before my image, my image is showing. This means I always have a 'margin' above my image :(. Thx Tuur! Can this be solved please?

    Autoheight problem stays: When I have add image and text next to it, my textfield is not resizing for the whole image, only the text fits. How can this be done? It looks like the image loads later, and because of that the height of the field is not being calculated. Sometimes it is going well (I don't know when, it appears to me the image is loading sometimes, and sometimes not :(). Is there someone with a solution?

    Of course I can add <br />, but when someone has another font, maybe the <br /> is not doing well.

  • Ok nice to solve my own problem: I got the brilliant (ahum) idea to define width and height of the images. Well, that works. Jeej!

    Autoheight now works, so my first question is still the same: is it possible to 'preload' the textfield-image?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!