C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2712
Number of posts: 5738

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Create multiple Iframes with an Array (C#) Posted by mhammond7635 on 10 Oct 2011 at 10:57 AM
Hi,

I'm a newbie & I need to create multiple iframes with an array, in a for loop! Is it even possible to do that! I accomplished it with Javascript, but I'm having a heck of a time doing the same in C#. Here's what I did in Javascript:

function load_startfrm() {

        for(i = 0; i < 25; i++) {
            ifrm[i] = document.createElement("IFRAME");
            ifrm[i].scrolling = "no";
            ifrm[i].setAttribute("src", 'http://localhost:8080/Map/png5.png');
            ifrm[i].style.width = 19.5 + "%";
            ifrm[i].style.height = 19.5 + "%";
            document.body.appendChild(ifrm[i]);
        }
        doLoop()
    }

    function load_frames() {
        
         for (var i in ifrm) {
              
           ifrm[i].setAttribute("src", url_name());
           document.body.appendChild(ifrm[i])
           //document.write();
        }
       loop = setTimeout("load_frames()", 2500);
    }


In the load_frames function, I have another function (url_name()) that randomly gets my URL. I would like to do something similar, but with C#

Thanks in advance!!

Marc



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.