Here Goes: I arrange my webpage depending on the clients browser window size. Currently I'm trying to figure out the height of the remaining div (in pixels) after I subtract the heights of other divs from the overall height (wich i have in a perl variable after client links into my page). Where I'm stuck is trying to find the height of the dynamic divs in a perl variable. I see there is a way in javascript of course, but I need the parameter in perl when I set the size of the middle div. I use jsdump to pass parameters from perl to javascript, what i need is the reverse, a way to pass javascript parameters back to perl so i can use the ("#myDiv").height(); when setting my middle div. here is a (very) rough outline of the structure:
<HTML> <DIV ID="Top" WIDTH=100> this is a dynamic div depending on contents </DIV> <DIV ID="Middle" WIDTH=100 HEIGHT={page/window height - "Top" div heig +ht - "Bottom" div height)> whats left of window </DIV> <DIV ID="Bottom" WIDTH=100> this is a dynamic div depending on contents </DIV> </HTML>
Again, i'm trying to get (in perl) the heights of the top and bottom divs so as to figure what height to set the middle div to so i remain inside the browsers window without a scrollbar showing up. I really hope i explained myself correctly, i could use this result in alot of my page, i try to fit (even up to resizing text/images) everything into the clients prefered browser window size. I'm trying to avoid scrollbars, this causes missed data from the viewable area, beside being encumbersome.. *heh*...

I did try re-inventing the wheel...
But it kept getting stuck on the corners


In reply to determine div size... by PriNet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.