Closed Thread Icon

Topic awaiting preservation: Need an Opera hook (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8012" title="Pages that link to Topic awaiting preservation: Need an Opera hook (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Need an Opera hook <span class="small">(Page 1 of 1)</span>\

 
Allewyn
Maniac (V) Mad Scientist

From: Solitary confinement
Insane since: Feb 2001

posted posted 01-04-2002 21:46

This script is what I'm using to determine browser type and, as is obvious, it doesn't include a hook for Opera.
<BLOCKQUOTE><FONT face="Verdana, Arial">code:</font><HR><pre><script language="JavaScript">
var nn4= (document.layers);
var nn6= (document.getElementById && !document.all);
var ie4= (document.all && !document.getElementById);
var ie5= (document.all && document.getElementById);

function loadPage(id,nestref,url) {
// change the 550 value to make the layer wider or smaller
content_width = 350;
if (nn4) {
var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]
lyr.load(url,content_width)
}
else if(ie4) parent.contentFRM.location = url;
else if(ie5

bitdamaged
Maniac (V) Mad Scientist

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

posted posted 01-04-2002 22:20

There's actually some extra code here, you shouldn't need to code for the 6+ browsers sperately since both conform to the DOM and nestref looks like it is never getting set.

I thought the Opera (6 especially) browsers conform to the DOM and should get handled as nn6 but I don't use them much so I can't say for sure.

Sorry I don't currently have these installed so I can't give a better answer.




:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

Allewyn
Maniac (V) Mad Scientist

From: Solitary confinement
Insane since: Feb 2001

posted posted 01-05-2002 04:20

As I understand this code, nesref allows the linking call
("javascript:loadPage('contentLayer',null,'lim.htm')")
to refer to a nested div location, namely,

<div id="content">
<div id="contentLayer">
<iframe src="index2.html" name="contentFRM" id="contentFRM" width="100%" height="330" frameborder="0" hspace="5" vspace="5"></iframe>
</div>
</div>

Notice how contentLayer is called by loadPage? Anyway, that's how I understand it. When the link is activated, lim.htm displays in the iFrame, formatted by content and contentLayer, and nestref tells the script where contentLayer is...? Can I just create another variable and conditional statement to handle it?
Something like
var O6= (document.getElementById && !document.all);

and use something like

if (O6) {var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]lyr.load(url,content_width)}

to laod the page into the iFrame? Probably way off here, but looking for guidance.

Allewyn
Maniac (V) Mad Scientist

From: Solitary confinement
Insane since: Feb 2001

posted posted 01-05-2002 23:54

:: pokes head in and looks around the room ::

No takers?

:: backs out and closes door ::


psych3
Nervous Wreck (II) Inmate

From: Australia
Insane since: Feb 2001

posted posted 01-06-2002 20:39

Opera wont work with that script becuase the iframe element is not exposed to scripting. Go figure.......

----------------------
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.
-----------------------------

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 01-07-2002 17:58

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 01-07-2002 18:19

document.all will work in Opera only when it is running in MSIE compatibility mode (otherwise document.getElementById is only one that's available)...


Allewyn
Maniac (V) Mad Scientist

From: Solitary confinement
Insane since: Feb 2001

posted posted 01-10-2002 18:12

Ok, thanks for clearing that up for me!

« BackwardsOnwards »

Show Forum Drop Down Menu