How to make Iframe automatically resize when window is resized?

Discussion in 'Javascript' started by DL, Dec 10, 2009.

  1. DL

    DL Guest

    Current I'm using height={x}px and width={y}px.

    Intended browsers include: IE7 and Firefox 3.5.

    tia.
     
    DL, Dec 10, 2009
    #1
    1. Advertising

  2. DL wrote:

    > Current I'm using height={x}px and width={y}px.
    >
    > Intended browsers include: IE7 and Firefox 3.5.


    This is not supposed to work. If these are attributes of an (X)HTML element
    or attribute properties of an element object, you need to lose CSS's `px'.
    If these are assignments to short-hand CSS properties of an element object
    instead, the values must be strings. In any case, the parts in braces are
    not automatically expanded (unless this is code for some preprocessor); you
    need to use either plain variableidentifiers/property names or string
    concatenation right-hand side instead.

    In any case, you probably want to use frames, not iframes here, and you
    would not need any script then; what you are asking (in the wrong place, the
    Subject) for is pretty much against everything what iframes are designed
    for.

    RTFFAQ, RTFM, STFW. And, *please*, ask only smart questions from now on.

    <http://jibbering.com/faq/#posting>
    <http://www.catb.org/~esr/faqs/smart-questions.html>


    PointedEars
    --
    Prototype.js was written by people who don't know javascript for people
    who don't know javascript. People who don't know javascript are not
    the best source of advice on designing systems that use javascript.
    -- Richard Cornford, cljs, <f806at$ail$1$>
     
    Thomas 'PointedEars' Lahn, Dec 10, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Curzio Basso
    Replies:
    1
    Views:
    834
    David Fraser
    Apr 22, 2004
  2. Don
    Replies:
    29
    Views:
    981
    dorayme
    Oct 27, 2006
  3. K Viltersten

    Adjust a canvas as the window is resized

    K Viltersten, Mar 8, 2008, in forum: Python
    Replies:
    2
    Views:
    3,653
    K Viltersten
    Mar 10, 2008
  4. Replies:
    0
    Views:
    142
  5. Bad_Kid

    how can the window be resized?

    Bad_Kid, Nov 25, 2004, in forum: Javascript
    Replies:
    1
    Views:
    86
Loading...

Share This Page