Closed Thread Icon

Topic awaiting preservation: Loading External URL into layers (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8404" title="Pages that link to Topic awaiting preservation: Loading External URL into layers (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Loading External URL into layers <span class="small">(Page 1 of 1)</span>\

 
ChrisV
Obsessive-Compulsive (I) Inmate

From:
Insane since: Nov 2002

posted posted 11-22-2002 10:29

I trying to develop a crossbrowser code (IE5/6 , NN6) that would load multiple external urls into a number of layers (preloading). Did anyone write before such a code?

Then I will show/hide each layer, according to what I want to see.

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 11-22-2002 11:15

I believe it has been done here several times...

since iframe is both nn6 and ie4+ compatible, methods like using <iframe id="url1"></iframe> then via javascript changing it's src to get a new content will work.



Elias,

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 11-22-2002 18:00

hold on though.

You can use the iframe method to load URL's from external sites. However you will generally not be able to access the loaded URL (for like feeding into a layer) if is from a different domain. The default browser setting for cross domain scripting is disabled so it won't work for most users.



.:[ Never resist a perfect moment ]:.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-22-2002 18:43

since ChrisV only mentionned (s)he wanted to show the content there should be no problem.

just my 0.02? code

code:
<a href="javascript:void(0);" onclick="obj=document.getElementById('myIFrame1');obj.style.display=obj.style.display!='none'?'none':''">toggle IFRAME #1 display</a><br>
<a href="javascript:void(0);" target="myIFrame1" onclick="this.href=prompt('enter the new location')">change IFRAME #1 location</a><br>
<iframe id='myIFrame1' name='myIFrame1' border='4'></iframe>
<hr>
<a href="javascript:void(0);" onclick="obj=document.getElementById('myIFrame2');obj.style.display=obj.style.display!='none'?'none':''">toggle IFRAME #2 display</a><br>
<a href="javascript:void(0);" target="myIFrame2" onclick="this.href=prompt('enter the new location')">change IFRAME #2 location</a><br>
<iframe id='myIFrame2' name='myIFrame2' border='4'></iframe>
<hr>
<a href="javascript:void(0);" onclick="obj=document.getElementById('myIFrameN');obj.style.display=obj.style.display!='none'?'none':''">toggle IFRAME #N display</a><br>
<a href="javascript:void(0);" target="myIFrameN" onclick="this.href=prompt('enter the new location')">change IFRAME #N location</a><br>
<iframe id='myIFrameN' name='myIFrameN' border='4'></iframe>
<hr>



I tested that code in IE5.5 and Phoenix 0.3 on WIN2K.
Hope that helps.

Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 11-22-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu