SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    france
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Dynamic creation

    How do you create dynamic element such as ifram, div, table , etc....

    With the X library ???

    Thanks.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi steff10,

    There is no cross-browser way of creating new elements (after the page has loaded), so just use the standard DOM methods. Here's an example:
    Code:
        var e = document.createElement('IFRAME');
        e.id = 'myIFrameId';
        e.style.position = 'absolute';
        e.className = 'myIFrameClass';
        e.src = 'http://myExampleUrl.com/myExampleFile.html';
        document.body.appendChild(e);
        xShow(e);


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •