I found you can assign a class to a dynlayer like this:
<style type="text/css">
.orangeline {
color: #996699;
text-decoration:underline;
background-color: #eeeeee;
border-style: outset;
}
</style>
and then
DynAPI.onLoad = function() {
myLayer = new DynLayer(null,150,140,300,60)
myLayer.setHTML('hello')
DynAPI.document.addChild(myLayer)
myLayer.elm.className='orangeline'
}
You can only assign the class after the layer has been created.
You can change the class dynamically.
It doesn't work in NS4. Why? I don't know.
I hope we could get NS4 to at least show the bits that it supports.
Cheers,
Richard Bennett
[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to DynAPI2.51)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi
----- Original Message -----
From: "Barbie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:49 AM
Subject: Re: [Dynapi-Help] shortcomings or not(was Forms on layers)
> From: "Richard Bennett" <[EMAIL PROTECTED]>
>
> > The shortcomings I find irritating are:
> > * Memory issues if you use to many layers. This might improve slightly
> > still, but I think it's important to avoid it, by coding economically,
not
> > going overboard with a coverlayer, four border layers, a contentlayer,
and
> a
> > caption layer. Just use one layer, decorate it with css, and give it
> child
> > <div>s for headings, captions etc. The css won't show in NS4, but I
think
> if
> > a widget remains usable, if less pretty, on NS4 that's fine.
> > * A nice improvement would be that we could attach a css class directly
to
> a
> > DynLayer, like:
> > myLayer.setClass('greenborder')
> > That would save a lot of time, and we could keep a library of css
classes.
> > Again not 100% compatible with NS4, but degrading gracefully.
>
> Both of these are sort of the same thing really. I would love to have the
> Class passed to the layer, as currently our sitebuilders/designers
describe
> everything in CSS, which I then have to translate into the appropriate
code.
>
> Barbie.
>
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help