Table inside iFrame

Discussion in 'HTML' started by Su Man, Apr 7, 2004.

  1. Su Man

    Su Man Guest

    Hi,

    Is it possible to have a table directly in iFrame ?
    i.e. without using the html source in iFrame can I have table is iFrame
    directly? How?

    Please focus some light on this?

    Thanks,
    Su Man
     
    Su Man, Apr 7, 2004
    #1
    1. Advertising

  2. Su Man schrieb:
    > Hi,
    >
    > Is it possible to have a table directly in iFrame ?
    > i.e. without using the html source in iFrame can I have table is iFrame
    > directly? How?


    I don't understand your question. I mean, an iFrame is just like a
    frame: an external html file, that will be shown in a defined frame
    within the calling html... why shouldn't it be possible to have a table
    within an iFrame? have you tried it? :) --

    bernhard
    ---
    www.daszeichen.ch
    remove nixspam to reply
     
    Bernhard Sturm, Apr 7, 2004
    #2
    1. Advertising

  3. Su Man

    SpaceGirl Guest

    "Su Man" <> wrote in message
    news:c50lbe$r13$...
    > Hi,
    >
    > Is it possible to have a table directly in iFrame ?
    > i.e. without using the html source in iFrame can I have table is iFrame
    > directly? How?
    >
    > Please focus some light on this?
    >
    > Thanks,
    > Su Man



    I think you should be using layers rather than iframes. A layer can contain
    any HTML elements and be placed anywhere on the screen, without having to
    define a source.

    Basically, you can't do what you're asking. Iframes can only contain
    documents (such as asp, php, htm).
     
    SpaceGirl, Apr 7, 2004
    #3
  4. Su Man

    Su Man Guest

    I meant, I do not want to show an htm,jsp file inside a iframe.
    Instead I directly want to construct a table inside iFrame.

    Su Man

    "Bernhard Sturm" <> wrote in message
    news:...
    >
    >
    > Su Man schrieb:
    > > Hi,
    > >
    > > Is it possible to have a table directly in iFrame ?
    > > i.e. without using the html source in iFrame can I have table is iFrame
    > > directly? How?

    >
    > I don't understand your question. I mean, an iFrame is just like a
    > frame: an external html file, that will be shown in a defined frame
    > within the calling html... why shouldn't it be possible to have a table
    > within an iFrame? have you tried it? :) --
    >
    > bernhard
    > ---
    > www.daszeichen.ch
    > remove nixspam to reply
    >
     
    Su Man, Apr 7, 2004
    #4
  5. Su Man

    SpaceGirl Guest

    You cant do that... that's not what Iframes are for. Iframes are ONLY
    designed for containing other pages. While those pages *could* be dynamic,
    you simply cant "have a table inside it". You really need to pick up an HTML
    book and look through how frames work, I think.

    "Su Man" <> wrote in message
    news:c50pcl$bse$...
    > I meant, I do not want to show an htm,jsp file inside a iframe.
    > Instead I directly want to construct a table inside iFrame.
    >
    > Su Man
    >
    > "Bernhard Sturm" <> wrote in message
    > news:...
    > >
    > >
    > > Su Man schrieb:
    > > > Hi,
    > > >
    > > > Is it possible to have a table directly in iFrame ?
    > > > i.e. without using the html source in iFrame can I have table is

    iFrame
    > > > directly? How?

    > >
    > > I don't understand your question. I mean, an iFrame is just like a
    > > frame: an external html file, that will be shown in a defined frame
    > > within the calling html... why shouldn't it be possible to have a table
    > > within an iFrame? have you tried it? :) --
    > >
    > > bernhard
    > > ---
    > > www.daszeichen.ch
    > > remove nixspam to reply
    > >

    >
    >
     
    SpaceGirl, Apr 7, 2004
    #5
  6. Su Man

    Kris Guest

    In article <c50rbp$2mto5g$-berlin.de>,
    "SpaceGirl" <> wrote:

    > You cant do that... that's not what Iframes are for. Iframes are ONLY
    > designed for containing other pages. While those pages *could* be dynamic,
    > you simply cant "have a table inside it". You really need to pick up an HTML
    > book and look through how frames work, I think.


    He/she wants a scrollable table.

    --
    Kris
    <> (nl)
    <http://www.cinnamon.nl/>
     
    Kris, Apr 7, 2004
    #6
  7. Su Man

    SpaceGirl Guest

    "Kris" <> wrote in message
    news:4all.nl...
    > In article <c50rbp$2mto5g$-berlin.de>,
    > "SpaceGirl" <> wrote:
    >
    > > You cant do that... that's not what Iframes are for. Iframes are ONLY
    > > designed for containing other pages. While those pages *could* be

    dynamic,
    > > you simply cant "have a table inside it". You really need to pick up an

    HTML
    > > book and look through how frames work, I think.

    >
    > He/she wants a scrollable table.
    >
    > --
    > Kris
    > <> (nl)
    > <http://www.cinnamon.nl/>


    Then s/he should place it in a layer, and enable content scrolling
    (overflow) in it.
     
    SpaceGirl, Apr 7, 2004
    #7
  8. SpaceGirl wrote:


    > Then s/he should place it in a layer, and enable content scrolling
    > (overflow) in it.


    <div id="Layer1" style="position:absolute; width:350px; height:105px;
    z-index:1; overflow: scroll;">the
    wonderful thing about tiggers is that I'm the only one. the wonderful
    thing
    about tiggers is that I'm the only one. the wonderful thing about
    tiggers is
    that I'm the only one. the wonderful thing about tiggers is that I'm
    the only
    one. the wonderful thing about tiggers is that I'm the only one. the
    wonderful
    thing about tiggers is that I'm the only one. the wonderful thing
    about tiggers
    is that I'm the only one. the wonderful thing about tiggers is that
    I'm the
    only one. the wonderful thing about tiggers is that I'm the only one.
    the wonderful
    thing about tiggers is that I'm the only one. the wonderful thing
    about tiggers
    is that I'm the only one. the wonderful thing about tiggers is that
    I'm the
    only one. the wonderful thing about tiggers is that I'm the only one.
    </div>
     
    Weyoun the Dancing Borg, Apr 7, 2004
    #8
  9. In article <c50lbe$r13$>, Su Man <>
    wrote:

    > Hi,
    >
    > Is it possible to have a table directly in iFrame ?
    > i.e. without using the html source in iFrame can I have table is iFrame
    > directly? How?
    >
    > Please focus some light on this?
    >
    > Thanks,
    > Su Man
    >
    >

    If you will go to my site and look at money conversion you will see a
    page with an iframe on the right. Initially it contains a web site for
    obtaining the conversion factor. Later it contains a dynamicaly
    generated table using the conversion factor. This is one way to do it
    and layers may be better but I wrote it before knowing of a better way.

    --
    Dennis M. Marks
    http://www.dcs-chico.com/~denmarks/
    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Apr 7, 2004
    #9
  10. In article <070420040718243764%>, Dennis M.
    Marks <> wrote:

    > In article <c50lbe$r13$>, Su Man <>
    > wrote:
    >
    > > Hi,
    > >
    > > Is it possible to have a table directly in iFrame ?
    > > i.e. without using the html source in iFrame can I have table is iFrame
    > > directly? How?
    > >
    > > Please focus some light on this?
    > >
    > > Thanks,
    > > Su Man
    > >
    > >

    > If you will go to my site and look at money conversion you will see a
    > page with an iframe on the right. Initially it contains a web site for
    > obtaining the conversion factor. Later it contains a dynamicaly
    > generated table using the conversion factor. This is one way to do it
    > and layers may be better but I wrote it before knowing of a better way.


    Oops. I just noticed that my server is down so it may take a little
    time to see my site. Sorry. It is 2004-04-07 at 7:21 AM PDT.

    --
    Dennis M. Marks
    http://www.dcs-chico.com/~denmarks/
    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Apr 7, 2004
    #10
  11. Weyoun the Dancing Borg wrote:

    >> Then s/he should place it in a layer, and enable content scrolling
    >> (overflow) in it.

    >
    > <div id="Layer1" style="position:absolute; width:350px; height:105px;
    > z-index:1; overflow: scroll;">


    I hate Dreamweaver[1]...

    OK, "Layer1" is a very bad choice for an id, and an id isn't require here.

    Elements shouldn't be absolutely positioned unless they need to be.

    Left/Right and Top/Bottom appear to be missing

    Sizes are generally better specified in a unit relative to the font rather
    then an absolute unit.

    So, the saner version of that code:

    <div style="width: 45em; height: 10em; overflow: auto;">

    - and an external style sheet is, as usual, preferred.

    [1] More precisely, I hate the code it produces when not in the hands of an
    expert who can work around its foibles and bad defaults (not that there can
    be a good default value for an id).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
     
    David Dorward, Apr 7, 2004
    #11
  12. Kris wrote:

    > He/she wants a scrollable table.


    I do quite like:

    tbody { height:5em ; overflow:scroll }

    Unfortunately only in Gecko :-(

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Apr 7, 2004
    #12
  13. Su Man

    mscir Guest

    Su Man wrote:

    > I directly want to construct a table inside iFrame.

    <snip>

    function buildiframetable() {
    //I used a form with text boxes for table parameters
    var tdpad = +document.forms("form1").tdpad.value
    var tdspace = +document.forms("form1").tdspace .value
    var tborder = +document.forms("form1").tborder .value
    var rows = +document.forms("form1").rows .value
    var cols = +document.forms("form1").cols .value

    //I think NN wants name and id the same so getElementById works
    var d = document.getElementById("iframe1").contentWindow.document

    //build table
    var table = d.createElement('table');
    table.border = tborder;
    table.cellPadding = tdpad;
    table.cellSpacing = tdspace;
    var tbody = d.createElement('tbody');
    for (var i=0; i<rows; i++) {
    var row = d.createElement('tr');
    for (var j=0; j<cols; j++) {
    var cell = d.createElement('td');
    cell.appendChild(d.createTextNode(i + ', ' + j));
    row.appendChild(cell);
    }
    tbody.appendChild(row);
    }
    table.appendChild(tbody);
    d.body.appendChild(table)
    }

    code modified from a comp.lang.javascript post by Martin Honnen 04/07/04
     
    mscir, Apr 7, 2004
    #13
  14. David Dorward wrote:

    > Weyoun the Dancing Borg wrote:
    >
    >
    >>>Then s/he should place it in a layer, and enable content scrolling
    >>>(overflow) in it.

    >>
    >><div id="Layer1" style="position:absolute; width:350px; height:105px;
    >>z-index:1; overflow: scroll;">

    >
    >
    > I hate Dreamweaver[1]...


    [2]




    >
    > OK, "Layer1" is a very bad choice for an id, and an id isn't require here.


    ok well make it a class then



    >
    > Elements shouldn't be absolutely positioned unless they need to be.


    easily fixed to percentages [2a]




    >
    > Left/Right and Top/Bottom appear to be missing


    yes




    >
    > Sizes are generally better specified in a unit relative to the font rather
    > then an absolute unit.


    well i didnt specify a font size?



    >
    > So, the saner version of that code:
    >
    > <div style="width: 45em; height: 10em; overflow: auto;">
    >
    > - and an external style sheet is, as usual, preferred.


    eee that's easier :)



    >
    > [1] More precisely, I hate the code it produces when not in the hands of an
    > expert who can work around its foibles and bad defaults (not that there can
    > be a good default value for an id).


    [2] Well I try to code by hand. Since I'[ve started using CSS I use
    dreamweaver's layout controls for layers just so i can see if what i
    want to do is possible, then re-write the css myself. since im still a
    beginner at css i find this easier.

    [2a] relative units can easily be put in dreamweaver, i just pixed px
    because that was already there. you can rmove that and put % if you like.
     
    Weyoun the Dancing Borg, Apr 8, 2004
    #14
  15. Weyoun the Dancing Borg wrote:

    >> OK, "Layer1" is a very bad choice for an id, and an id isn't require
    >> here.

    >
    > ok well make it a class then


    class="Layer1"? Its "Layer1" I'm taking issue with here, not id=.

    >> Elements shouldn't be absolutely positioned unless they need to be.

    >
    > easily fixed to percentages [2a]


    Absolutely positioned is absolutely positioned, no matter what units you use
    for your lengths.

    >> Sizes are generally better specified in a unit relative to the font
    >> rather then an absolute unit.

    >
    > well i didnt specify a font size?


    You specified a height and a width. I said "sizes" not "font sizes".

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
     
    David Dorward, Apr 8, 2004
    #15
  16. David Dorward wrote:

    > Weyoun the Dancing Borg wrote:
    >
    >
    >>>OK, "Layer1" is a very bad choice for an id, and an id isn't require
    >>>here.

    >>
    >>ok well make it a class then

    >
    >
    > class="Layer1"? Its "Layer1" I'm taking issue with here, not id=.


    Well that's just the default name given in Dreamweaver (this is why you
    dont like WYSIWYG hehe)

    Easily changed;

    www.dancingborg.co.uk/layer.gif

    you can call it anything you like, and alter the coding so it's a class
    (if you so wish) or leave it as an id if you want only that layer to
    have specific properties.


    >
    >
    >>>Elements shouldn't be absolutely positioned unless they need to be.

    >>
    >>easily fixed to percentages [2a]

    >
    >
    > Absolutely positioned is absolutely positioned, no matter what units you use
    > for your lengths.


    sorry I misunderstood - I'm still pretty new to CSS (self evident lol)

    Again, you can edit the coding afterwards.

    At this point though, it's probably easier to code it by hand if you
    need to edit the HTML it creates in nearly every way.



    >
    >
    >>>Sizes are generally better specified in a unit relative to the font
    >>>rather then an absolute unit.

    >>
    >>well i didnt specify a font size?

    >
    >
    > You specified a height and a width. I said "sizes" not "font sizes".


    sorry, you mentioned font. But I see what you mean - if the user changes
    their font size on their browser so it's 10x larger than wha I had in
    mind for a normal user, then it can make the layer look stupid
     
    Weyoun the Dancing Borg, Apr 8, 2004
    #16
  17. Weyoun the Dancing Borg wrote:

    >>>>Sizes are generally better specified in a unit relative to the font
    >>>>rather then an absolute unit.


    >>>well i didnt specify a font size?


    >> You specified a height and a width. I said "sizes" not "font sizes".


    > sorry, you mentioned font. But I see what you mean - if the user changes
    > their font size on their browser so it's 10x larger than wha I had in
    > mind for a normal user, then it can make the layer look stupid


    It _could_ do, but a good design is able to cope most of the time. It seems
    to me that a box containing text would be better if it increased in size
    along with the font size.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
     
    David Dorward, Apr 8, 2004
    #17
  18. David Dorward wrote:

    > Weyoun the Dancing Borg wrote:
    >
    >
    >>>>>Sizes are generally better specified in a unit relative to the font
    >>>>>rather then an absolute unit.

    >
    >
    >>>>well i didnt specify a font size?

    >
    >
    >>>You specified a height and a width. I said "sizes" not "font sizes".

    >
    >
    >>sorry, you mentioned font. But I see what you mean - if the user changes
    >>their font size on their browser so it's 10x larger than wha I had in
    >>mind for a normal user, then it can make the layer look stupid

    >
    >
    > It _could_ do, but a good design is able to cope most of the time. It seems
    > to me that a box containing text would be better if it increased in size
    > along with the font size.


    yes, sorry i should have been more clear in my reply, i meant that if
    you dont have the layer increasing along with the text, then you would
    end up with an odd looking layer if the user puts their font at 10x the
    normal (expected) size.
     
    Weyoun the Dancing Borg, Apr 8, 2004
    #18
    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. Daedalous
    Replies:
    3
    Views:
    789
    Daedalous
    Jan 16, 2004
  2. Nathan Carr
    Replies:
    0
    Views:
    287
    Nathan Carr
    Sep 17, 2004
  3. Joe Attardi
    Replies:
    0
    Views:
    540
    Joe Attardi
    Jan 17, 2006
  4. Replies:
    0
    Views:
    132
  5. KDawg44

    Reloading an iFrame inside an iFrame

    KDawg44, Jan 21, 2009, in forum: Javascript
    Replies:
    4
    Views:
    179
    Jorge
    Jan 22, 2009
Loading...

Share This Page