Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Quick Question

  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quick Question

    I've got this bit of javascript:

    IFrames = document.getElementsByTagName('IFRAME');
    if(Threads > IFrames.length)
    for(i = IFrames.length+1; i <= Threads; i++)
    {
    oIFrm = document.createElement('IFRAME');
    oIFrm.name = 'i'+i;
    oIFrm.width = '10';
    oIFrm.height = '10';
    oIFrm.scrolling = 'no';
    oIFrm.frameBorder= 'no';
    document.appendChild(oIFrm);
    }

    When the function is called, it's not showing the iframes in the document. They are loaded but not shown. Where did I go wrong?

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    728
    Thanks
    35
    Thanked 132 Times in 123 Posts
    Append the iframes to the body or some other element,
    not the document object


  •  

    Posting Permissions

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