Create multiple Iframes with an Array (C#) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Create multiple Iframes with an Array (C#)

mhammond7635mhammond7635 Posts: 2Member
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:

[code]
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);
}
[/code]

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

Sign In or Register to comment.