[OpenLayers-Users] OpenLayers.Control.Button

francescoboccacci at libero.it francescoboccacci at libero.it
Sat Jun 2 09:11:48 PDT 2012


Hi all,
i have a question about  OpenLayers.Control.Button. Is it possible to  
simulate click event as :

document.getElementById('MyButton').click() 

in all buttons in javascript?

My button is:

 my_Button = new OpenLayers.Control.Button({
                id: 'olControlMyButton',
                displayClass: 'olControlMyButton',
                type: OpenLayers.Control.TYPE_TOGGLE,
                eventListeners: {'activate': function(){test1()}, 
'deactivate': function(){test2()}}
                });

I would like to have the follow behavior :

If a cookie value is True, click on my button.

Thanks

Francesco




More information about the Users mailing list