Closed Thread Icon

Preserved Topic: Crossbrowser 'iframes' Pages that link to <a href="https://ozoneasylum.com/backlink?for=18176" title="Pages that link to Preserved Topic: Crossbrowser &amp;#039;iframes&amp;#039;" rel="nofollow" >Preserved Topic: Crossbrowser &#039;iframes&#039;\

 
Author Thread
Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-06-2002 17:25

I know the topic has come up a number of times (Bugimus has even called it the 'Holy Grail' on a couple of occasions) but I haven't seen any working examples (that I'm aware of - I think mr.maX had a script but I didn't think it did whole pages, or perhaps I'm wrong). I was thinking that something like that may prove a good idea for PSPong.com to stop having to reload very graphics heavy segments when one only really wants to refresh the comments say but as the layout is still up in the air and it is of general interest I thought I'd open up a specific thread and see what people have got (as I'm sure a number of you are beavering away on something like this). The really tricky bit seems to be the NS4.x part (and yes I think it is worth supporting it otherwise I don't think 'iframes' can really be of much use expect for, e.g. intranets, where you know NS4.x won't be used) as, as far as I'm aware, layers aren't scrollable so there is more work involved there. I know lallous has thrown in some great ideas here on this topic and as far as I can tell the whole NS4.x thing with loading has been sorted out here:
www.webreference.com/dhtml/column23

The real trick is to get it all working together through a common function (unless we just do this all server side). I had a bash (leaving NS4.x aside(ish) [I did throw in a bit of lallous' code to give an idea]) but Op5 doesn't like it (I seem to have had a bit of trouble with NS6 so I can't tell if it works there):

code:
<html> 
<head>
<title>Xbrowser 'iframe' test</title>

<script language="JavaScript" type="text/javascript">
<!--
function init() {
// may need this to stop loading the various layers and frames
with 2 lots of the same page
loadPage ('left', 'left.php');
}
function loadPage (target, page) {
if (document.layers) {
// width = 0.65 * innerWidth; // work out what percent the
IFRAMES are here when things are agreed on
layername = target+"Layer";
o = document.layers['layername'];
o.load('page', width);
}
else {
framename = target+"Iframe";
parent.frames[framename].location.href=page;
}
}
//-->
</script>

<style type="text/css">
<!--
layer {
display: none;
}
//-->
</style>

</head>

<body onload="init();">

<nolayer>
<iframe name="leftIframe" id="leftBoxIframe"></iframe>
</nolayer>
<layer name="leftLayer" id="leftBoxLayer"></layer>

</body>
</html>



Have I just got the JavaScript wrong or is Opera being grumpy for a reason (I had a look at the change log for Op6: www.opera.com/windows/changelog/log600beta1.html
but the list was a bit vague like 'general improvements' and its not clear if there will be the kind of JavaScript support that everyone seems to need to do anything interesting)?

Emps

[edit: To prevent HSBOD]


You're my wife now Dave

[This message has been edited by Emperor (edited 01-06-2002).]

Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 01-06-2002 17:53

Emps, I'm using a script which link was provided, of course, by mr.maX, the URL is http://www.dhtmlnirvana.com/alchemy/externalload.htm


I'm working on this site: http://www.fascinationtransport.com/eye it's just to practice (takes an eternity to load) but i'm using that script, still I haven't test it in must browsers, but you can take a look...

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-06-2002 17:58

Wakkos: Excellent thanks for that - I knew someone out there had done this but I'd had a good nose around and must have missed this. I'll have a play with it now!!

[edit: By the way I tried your page in Op5 and it didn't work - is there a way to get Opera to work? It accepts IFRAMEs and basic JavaScript but.... Nice page though you've got that scrolling background working v. nicely]

[edit: However, the scrolling doesn't work so well in Op5]

Emps

[This message has been edited by Emperor (edited 01-06-2002).]

[This message has been edited by Emperor (edited 01-06-2002).]

Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 01-06-2002 18:51

I've been trying to make it work in Opera too, but neither the Bug's script or the Iframe works... I'll be trying!

psych3
Nervous Wreck (II) Inmate

From: Australia
Insane since: Feb 2001

posted posted 01-06-2002 20:36

While Opera accepts the iframe element, the iframe isnt exposed to scripting and that is what would be causing the problems you are experiencing.

----------------------
Eddie Traversa
DHTML NIRVANA
Multiple Award Winning Sites
Macromedia Resources & Various Other Goodies.
http://www.dhtmlnirvana.com/
--------------------------
Dynamic XHTML Developers Guide
Currently being written by Jeff Rouyer and little ol me
Let you know about a firm release date as soon as I know.
-----------------------------

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-06-2002 21:10

If I'm not mistaken the technique Wakkos is implementing loads the page into the IFRAME and then loads it into a DIV. This may be a stupid question but would that double the time it takes for the page to display the external page (as compared to loading it directly into an IFRAME)?

psych3: Thanks for the information - it rathers kills the concept of making this cross browser. You wouldn't happen to know if changing the settings to make it act like MSIE5 (see other post on DHTML in Opera if that isn't clear) changes this?

Emps


You're my wife now Dave

psych3
Nervous Wreck (II) Inmate

From: Australia
Insane since: Feb 2001

posted posted 01-07-2002 05:21

It typically takes milliseconds to shift the content from an iframe to a div so its not as big as issue as it would seem. But nonetheless it does take longer than loading into an iframe. The reason we shift from an iframe to <div> is to maintain transparency. in IE5.5 and IE6 you can have transparent iframes, but for other browsers it becomes problematic. My general rule is if you need transperancy then shift the content, otherwise just load into an iframe.

I am not sure whether chaging the settings in opera will effect a change or not. One way to find out though and that is to try it :-)



----------------------
Eddie Traversa
DHTML NIRVANA
Multiple Award Winning Sites
Macromedia Resources & Various Other Goodies.
http://www.dhtmlnirvana.com/
--------------------------
Dynamic XHTML Developers Guide
Currently being written by Jeff Rouyer and little ol me
Let you know about a firm release date as soon as I know.
-----------------------------

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-07-2002 13:23

psych3: Thanks for the overview there.

I have checked Wakkos' page with 'Browser identification' set as IE5 and Moz5 but it makes no difference (I didn't have much faith that it would).

It does look like there is no way to make this work in Opera without using conventional links and target. Anyone know any different? Can we afford to ignore Opera (I do often use it as my principle browser if IE is acting up or I just need to get online and get information quickly)?

Emps


You're my wife now Dave

« BackwardsOnwards »

Show Forum Drop Down Menu