For Dynapi 3, there's an example in the examples folder:
dynapi3x/examples/dynapi.api.mouseevent.html
it looks complicated, but take a look at the source, that should help.
you should be able to do something like this:
var botao1 = new DynLayer(20,2,50,150,20,false);
botao1.setClass ('menu-off');
botao1.setHTML('<table width=100% border=0 ceppadding=0
cellspacing=0><tr><td>test</td></tr></table>')
var mouseEvents = {};mouseEvents. {
var sourceLayer = e.getSource();
alert(sourceLayer.id);
}
botao1.addEventListener(mouseEvents);
I didn't actually run that, but if it doesn't work, it should be pretty close.
Jesse
António Godinho wrote:
I'm using DynAPI 3.0 that's why I'm having all this troubles...Thanx, António Godinho -----Mensagem original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Em nome de Jesse Vitrone Enviada: quinta-feira, 4 de Dezembro de 2003 12:41 Para: [EMAIL PROTECTED] Assunto: Re: [Dynapi-Help] Onmouse over and click There's an example for onmouseover here: http://dynapi.sourceforge.net/doccenter/index.php?EventListeners and onclick is explained too. If you're using Dynapi 3.0, it's a little different, you'll have to look at the 3.0 docs. Jesse Vitrone António Godinho wrote:Hya, I'm trying to figure this out from the examples but I haven't been able. I've this layer with only text where I've defined it's class, howcanI make a onmouseover and click with this layer? Thanx, António Godinho Layer code: var botao1 = new DynLayer(20,2,50,150,20,false); botao1.setClass ('menu-off'); botao1.setHTML('<table width=100% border=0 ceppadding=0 cellspacing=0><tr><td>test</td></tr></table>') ------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site= _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site=8 _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help ------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site= _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help
