PDA

View Full Version : how can i use 2 iframe in 1 page



jackavin
08-16-2007, 11:18 AM
1) Script Title:
iframe ssi II
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
3) Describe problem:
can i use 2 iframe in 1 page with different target thx

jscheuer1
08-16-2007, 12:11 PM
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe1", "myframe2"]

and:


<iframe id="myframe1" src="somepage.htm" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

<iframe id="myframe2" src="anotherpage.htm" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

Once you have that stuff, you can use:


<a href="javascript:loadintoIframe('myframe1', 'some.htm')">Link</a>

and:


<a href="javascript:loadintoIframe('myframe2', 'another.htm')">Link</a>

jackavin
08-16-2007, 08:23 PM
thx dude