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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic sized image behind scrolling text

Status
Not open for further replies.

siNeD

MIS
Oct 25, 2002
1
CA
Hello!
Please help me with the following problem:
On my sample page (bottom) there are 2 layers. The lower one is the backround image that should fit automatically it's size to the window size. The upper one is a scrolling text. No problem at Netscape. With IE 4.0: As soon as I change the original size of the picture in the lower layer (width="...", it doesn't matter if it's an absolute or a percentual value), the text scrolls very slow.If I erase the definition of the size (width="...") the text is scrolling in the normal speed. What can I do???
(the picture MUST fit it's size to the window and the text MUST scroll in in the foreground)
Thanks for your help!
denis
Sourcecode:
<HTML>
<HEAD>
<TITLE>xxxx</TITLE>
<META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html;charset=ISO-8859-1&quot;>
<META NAME=&quot;KEYWORDS&quot; CONTENT=&quot;xxxx&quot;>
<style>
<!--
body
{
background-color: white;
font-size:14px;
font-family: Arial, Helvetica, sans-serif;
text-align:left;
}
.schriftart
{
position: absolute;
top:0; visibility:hidden;
font-family: Arial, Helvetica, sans-serif;
}
// -->
</style>
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
<!--
var delay = 20
function Schrifton(bezeichnung, x1, y1, x2, y2, schritt)
{
if(document.layers)
{document.layers[&quot;Sch&quot;+bezeichnung].visibility = &quot;show&quot;;
Schrift(bezeichnung, x1, y1, x2, y2, schritt)}
else
{document.all[&quot;Sch&quot;+bezeichnung].style.visibility = &quot;visible&quot;;
Schrift(bezeichnung, x1, y1, x2, y2, schritt)}
}
function Schrift(bezeichnung, x1, y1, x2, y2, schritt)
{ if(document.layers)
{document.layers[&quot;Sch&quot;+bezeichnung].left=x1;
document.layers[&quot;Sch&quot;+bezeichnung].top=y1;}
else
{document.all[&quot;Sch&quot;+bezeichnung].style.left=x1;
document.all[&quot;Sch&quot;+bezeichnung].style.top=y1;}
x1+=(x2-x1)/schritt;
y1+=(y2-y1)/schritt;
if(schritt>0) setTimeout('Schrift('+bezeichnung+','+x1+','+y1+','+x2+','+y2+','+(schritt-1)+')', delay);
}
function init()
{
{
Schrifton(9090, 0,0,0,0,1);
Schrifton(9012, 114, -100, 114, 420, 35);}
}
// -->
</script>


<OBJECT
CLASSID=&quot;clsid:D702FBF4-EE60-11d0-BD5B-00A0C91F4635&quot;
CODEBASE=&quot;/CFIDE/classes/CFJava.cab#Version=4,0,1,0&quot;>
</OBJECT>



<script LANGUAGE=JAVASCRIPT>
<!--
function _CF_checkgetquestion(_CF_this)
{
return true;
}

//-->
</script>
</HEAD>
<BODY TEXT=&quot;#000000&quot; LINK=&quot;#303010&quot; VLINK=&quot;#909090&quot; ALINK=&quot;#606050&quot; TOPMARGIN=&quot;0&quot; LEFTMARGIN=&quot;0&quot; border=&quot;0&quot; onLoad=&quot;init()&quot;
background=&quot;layout/background-web.gif&quot;>
<div id=&quot;Sch9090&quot; class=schriftart style=&quot;z-index:1&quot;><img src=&quot; WIDTH=&quot;100%&quot; border=&quot;no&quot;>
</div>
<!-- Kopf, Menü und Fuß -->
<div id=&quot;Sch9012&quot; class=schriftart style=&quot;z-index:28&quot;><table width=&quot;340&quot;><td width=&quot;340&quot; align=&quot;left&quot;><font face=&quot;Arial, Helvetica&quot; size=&quot;2&quot;>...TEXT Text TEXT Text
TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT
Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text TEXT Text
</font></td></table></div>
</BODY>
</HTML>
 
This may be more accurately solved in the dhtml/html forum...
but.... the problem is that IE and netscape have two seperate DOM's that control layers. People have been trying to change this but Microsoft has always managed to change stuff a little bit everytime to make sure you have to write code specific for their apps. I haven't had time to look at your code but you will want to check out where the guy their has already figured out how to get around this. Look at the curious_eye tutorial..

good luck
[sig]<p>ackka<br><a href=mailto:tmoses@iname.com>tmoses@iname.com</a><br><a href= my site</a><br>"Do No Harm, Leave No Tracks"<br>
ICMP Summer 2000, 2600 Article<br>
<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top