Hi,

I've been trying to load inline layer content into a scrollpane, but this 
doesn't seem to work for navigator 4.08 or 6+, whereas it works fine w. IE 5.5.

I've tried loading the layer directly into the scrollpane as well as 
getting its content and sticking into a label and putting that into the 
scrollpane with the same result. I've tried changing the display property 
of the layer to be loaded and not changing it. Netscape refuses to cooperate.

It seems that in Nestcape I can't get the contents of an inline layer I've 
declared using getHTML().

The reason I'd lie to do it this way is that the content to be loaded into 
the pane can be fairly long and complex, which makes it a pain to assign it 
directly to the label or the pane, particularly if the content is generated 
using XML/XSL. A matter of separating code and content as far as possible.

Any suggestions would be appreciated.

Here's one of my experiments which works fine w. IE.

<html>
<head>
<title>DynAPI Examples - ScrollPane</title>
<script language="JavaScript" src="../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.event.*')

DynAPI.include('dynapi.ext.inline.js')
DynAPI.include('dynapi.util.debug')

DynAPI.include('dynapi.util.thread.js');
DynAPI.include('dynapi.util.pathanim.js');
DynAPI.include('dynapi.gui.dynimage.js');
DynAPI.include('dynapi.gui.button.js');
DynAPI.include('dynapi.gui.scrollbar.js');
DynAPI.include('dynapi.gui.viewport.js');
DynAPI.include('dynapi.gui.scrollpane.js');
DynAPI.include('dynapi.gui.label.js');
</script>

<style type="text/css">
.txtPlain {font-family:verdana,sans-serif; font-size:11px}
</style>

<script language="Javascript">



DynAPI.onLoad = function() {

         var layer1 = this.document.getAll()['layer1']

         var label1 = new Label(layer1.getHTML())

         scrollobj = new ScrollPane(label1)
         scrollobj.setSize(400,300)
         scrollobj.moveTo(50,50)
         scrollobj.setBgColor('#ebebea')

         DynAPI.document.addChild(scrollobj)

}

//-->
</script>
</head>
<body bgcolor="#ffffff">


<div id="layer1" style="position:absolute;visibility:hidden">
<table width="380" cellpadding="7" cellspacing="0" border="0"><tr><td>
<p class="txtPlain">
Call me Ishmael. Some years ago- never mind how long precisely- having 
little or no money in my purse, and nothing particular to interest me on 
shore, I thought I would sail about a little and see the watery part of the 
world. It is a way I have of driving off the spleen and regulating the 
circulation. Whenever I find myself growing grim about the mouth; whenever 
it is a damp, drizzly November in my soul; whenever I find myself 
involuntarily pausing before coffin warehouses, and bringing up the rear of 
every funeral I meet; and especially whenever my hypos get such an upper 
hand of me, that it requires a strong moral principle to prevent me from 
deliberately stepping into the street, and methodically knocking people's 
hats off- then, I account it high time to get to sea as soon as I can. This 
is my substitute for pistol and ball. With a philosophical flourish Cato 
throws himself upon his sword; I quietly take to the ship. There is nothing 
surprising in this. If they but knew it, almost all men in their degree, 
some time or other, cherish very nearly the same feelings towards the ocean 
with me.
</p>
<p class="txtPlain">
There now is your insular city of the Manhattoes, belted round by wharves 
as Indian isles by coral reefs- commerce surrounds it with her surf. Right 
and left, the streets take you waterward. Its extreme downtown is the 
battery, where that noble mole is washed by waves, and cooled by breezes, 
which a few hours previous were out of sight of land. Look at the crowds of 
water-gazers there.
</p>
<p class="txtPlain">
Circumambulate the city of a dreamy Sabbath afternoon. Go from Corlears 
Hook to Coenties Slip, and from thence, by Whitehall, northward. What do 
you see?- Posted like silent sentinels all around the town, stand thousands 
upon thousands of mortal men fixed in ocean reveries. Some leaning against 
the spiles; some seated upon the pier-heads; some looking over the bulwarks 
of ships from China; some high aloft in the rigging, as if striving to get 
a still better seaward peep. But these are all landsmen; of week days pent 
up in lath and plaster- tied to counters, nailed to benches, clinched to 
desks. How then is this? Are the green fields gone? What do they here?
</p>
</td></tr></table>
</div>


</body>
</html>



_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to