bhollin
09-24-2003, 05:14 PM
I have an iframe that works fine, as long as it contains src="myurl", for example:
<iFrame width="510" height="326" src="myurl" name="textbox" border="0" bordercolor="#ffffff" hspace="0" vspace="0" marginwidth="4" marginheight="1" scrolling="auto" frameborder="0"></iFrame>
What I'm trying to do is to externalize the url in an array for easier maintenance. My array looks like:
var framedoc=new Array(2)
framedoc[0]="myurl1"
framedoc[1]="myurl2"
I can't seem to figure out the right syntax to replace the src="myurl" in the iframe with a reference to the url in the array. I presume it's something like: src=document.array.framedoc[0] or src=document.framedoc[0].src, but don't seem to have it right. What's the correct syntax? Thanks.
<iFrame width="510" height="326" src="myurl" name="textbox" border="0" bordercolor="#ffffff" hspace="0" vspace="0" marginwidth="4" marginheight="1" scrolling="auto" frameborder="0"></iFrame>
What I'm trying to do is to externalize the url in an array for easier maintenance. My array looks like:
var framedoc=new Array(2)
framedoc[0]="myurl1"
framedoc[1]="myurl2"
I can't seem to figure out the right syntax to replace the src="myurl" in the iframe with a reference to the url in the array. I presume it's something like: src=document.array.framedoc[0] or src=document.framedoc[0].src, but don't seem to have it right. What's the correct syntax? Thanks.