[OpenLayers-Users] How to programmatically open/close Popup?

Stephen Woodbridge woodbri at swoodbridge.com
Thu Mar 11 23:33:55 EST 2010


Hi all,

I have an OpenLayers.Popup.FramedCloud popup that contains a form for 
entering/editing a features attributes. The form has a save button with 
an onClick function attached that needs to save the data to the server 
then close the popup. Currently the button only issue an alert.

How can I programmatically trigger the close from my onclick handler?

You can see example here:
http://imaptools.com:8080/tilecache/test.html?zoom=17&lat=33.89595&lon=35.49935&layers=BT

1) load page, pan slightly to work around feature load bug
2) click left most tool in tool bar
3) click on green POI (you should get popup)

I have only worked on this in FF, others might not work yet.

I have looked over the event code and the popup code, but I'm not seeing 
a way to do this.

Thanks,
   -Steve



More information about the Users mailing list