Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Firefox with layers &/or <DIV> tag

Status
Not open for further replies.

Cresby

Programmer
Aug 15, 2002
287
GB
I am not sure what fails in Firefox (appName=Netscape appVersion = 5.0..........) that works in IE5.5 & 6.0 and can be made to work in Netscape 4.5 any ideas?

ns & ie are created by tests that genrate nulls if not that browser (in Firefox both nulls) the set-up for layers has been ommitted for simplicity but may be relevant. I will ask the code originator if I can locate him.

if (ns){
for (i=0; i < n; i++)
document.write('<layer name="nsmsg'+i+'" top=0 left=0 height='+b+' width='+b+'><center>'+props+msg+'</font></center></layer>');
}
if (ie){
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="iemsg" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center;font-weight:regular;cursor:default">'+props+msg+'</font></div>');
document.write('</div></div>');
see or
 
I forgot more code at the bottom - the closing brace

}
(ns)?window.captureEvents(Event.MOUSEMOVE ):0;
if (ns||ie){
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
}
if (ns||ie)window.onload=drag;

function drag looks to be straightforward maths to generate a moving ovoid by re-locating the layer or DIV tag

TIA
 
Can you show us the tests you use to determine IE and Netscape?

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
var ns=(document.layers);
var ie=(document.all);

Firefox reports nulls on both

The actual code has changed because it involved scrolling text in an oval. Some surfers remarked it was getting their attention - well it did its job but it was a bit over the top. I decided to use the status bar and that worked on Firefox to a point. The captureEvents() method worked but Ff holds the URL during hovver - not a major problem as I hold a message behind which becomes visible.

Thanks for your offer of help but the solutions were getting more contorted even so I still needed help.

The new code on this browser (IE6.0 at the library) works on all pages except for my home page which is calling for a JavaScript file 'src=" "' - is my face red!

sticks thumb in mouth and "Waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top