One way to do this would be using a single layer that will act as tooltip.
This tooltip can then be placed on any mouseover event on any layer, and
hidden when a mouseout event is triggered.
Since you usually only show 1 tooltip at a time, a single layer could do the
trick.
use the setHTML() of that layer to set the correct tooltip text.
Make it a child layer of the main document, so that it can actually be
placed ontop of other layers/widgets, and also not be bound by those layers'
borders.
2nd. you can access those images using the id value:
layer.doc.images['theuniqueimagename'].src='newsrc url'
Note that the image must have a truly unique name.. in IE it's a global
area, that doesn't depend on which layer the image is placed. This way you
can change the source of the image, without having to do a full rewrite of
the image..should get rid of the placeholder in NS (not tried and tested,
but sounds nice doesn't it ? :-)
cya,
Pascal Bestebroer ([EMAIL PROTECTED])
Software ontwikkelaar
Oberon Informatiesystemen b.v.
http://www.oibv.com
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Namens Michael Towers
> Verzonden: donderdag 8 februari 2001 14:25
> Aan: [EMAIL PROTECTED]
> Onderwerp: [Dynapi-Help] Tooltips
>
>
> Hi,
>
> I'm a bit new to DynApi and javascript in general so I
> appologise in advance
> if any of this seems a bit stupid. I have two problems I am trying to
> solve.
>
> First, I would like to be able to add tooltips to layers.
> The layers will
> contain an image or have the background colour set. I have
> tried adding a
> child layer and setting an image into it using the setHTML()
> method and
> setting the ALT tag. This seems to work but interfers with
> the mouse event
> on the parent layer. Any ideas?
>
> Second, I would like to be able to create an layer or inline
> layer with a
> background image. The background image would change for animated gif
> informing the user that something is being loaded, when the
> user clicks a
> button. I then want to change the background to an image
> which I download
> from another website. I tired using the setHTML() method as below :
>
> layersetHTML ( "<img id = 'RoomImg'
> src='http://x.com/scripts/invoke2.php3?USER=Test&WIDTH=800&HEI
> GHT=0&XPOS=0&Y
> POS=0' height='500' width='500' suppress</img>", true );
>
> This works fine in IE but in NS I get a place holder while
> the image is
> being downloaded. Is there a better way to do this? I
> thought of using a
> DynImage but was unable to workout how to download the image into it.
>
> Thanks
>
> Mike..
>
> _______________________________________________
> 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