Kit,
First, if you post "code" here for review please simplify it. Scrolling
through 4 pages of text to "glean" a problem tends to turn help away.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Kit Cheong
Sent: Monday, April 30, 2001 3:22 AM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] setting the visibility of layers
hi,
This is my first time using dynapi and i gotta say it
makes it much
easier to write cross-browser code.
Anyway, i got a problem. i have a couple of layers and
have put html
in them using setHTML. these layers are defined to be
hidden when i
first create them. my problem lies with netscape 4 and
above (till
before 6). in ie and ns6, the code works fine.
well, what happens is that on ns4 when the layers
load, a portion of
the layer can be seen displaying on the top of the
page. and stays on
top of the background text until you move to another
browser and then
it disappears.
wherever there's an image<img> in the code, u can just
replace it with anything to test it out.
here's my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script src="../../dynapi/src/dynapi.js"></script>
<script>
DynAPI.setLibraryPath('../../dynapi/src/lib')
DynAPI.include('dynapi.api.browser.js')
DynAPI.include('dynapi.api.dynlayer.js')
DynAPI.include('dynapi.api.dyndocument.js')
DynAPI.include('dynapi.event.*')
DynAPI.onLoad = function() {
aLayer=new DynLayer
(null,105,180,163,150,'',false);
aLayer.setZIndex(56);
bLayer=new DynLayer (null,105,240,163,156,'',false);
bLayer.setZIndex(78);
aLayer.setHTML('<table width="160" border="0"
cellspacing="0"
cellpadding="1" align="left"><tr><td>layer a text goes
here layer a
text goes here<br><img src="Weird.jpg" width="150"
height="120"
border="0" alt=""><br>layer a text goes here layer a
text goes here
layer a text goes here</td></tr></table>');
bLayer.setHTML('<table width="160" border="0"
cellspacing="0"
cellpadding="1" align="left"><tr><td>layer b text goes
here layer b
text goes here<br><img src="Weird.jpg" width="150"
height="120"
border="0" alt=""><br>layer b text goes here layer b
text goes here
layer b text goes here</td></tr></table>');
this.document.addChild(aLayer)
this.document.addChild(bLayer)
}
</script>
some text here. this is only a test. some text here.
this is only a
test. some text here. this is only a test. some text
here. this is
only a test. some text here. this is only a test.
some text here.
this is only a test.some text here. <br><img
src="Weird1.jpg"
width="220" height="250" border="0" alt=""><br>this is
only a test.
some text here. this is only a test. some text here.
this is only a
test.some text here. this is only a test.some text
here. this is only
a test.some text here. this is only a test.some text
here. this is
only a test.some text here. this is only a test.some
text here. this
is only a test.some text here. this is only a
test.some text here.
this is only a test.some text here. this is only a
test.some text
here. this is only a test.some text here. this is only
a test.some
text here. this is only a test.some text here. this is
only a
test.some text here. this is only a test.some text
here. this is only
a test.some text here. this is only a test.some text
here. this is
only a test.some text here. this is only a test.some
text here. this
is only a test.some text here. this is only a
test.some text here.
this is only a test.
<br><br><a href="#"
onmouseover="aLayer.moveTo(200,80);
aLayer.setVisible(true);"
onmouseout="aLayer.setVisible(false);">A
layer appears here</a><br><br>
<a href="#" onmouseover="bLayer.moveTo(200,240);
bLayer.setVisible(true);"
onmouseout="bLayer.setVisible(false);">B
layer appears here</a>
</body>
</html>
thanks.
:)
kit.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help