Skip to main content

I'm stumped on how to trigger or trap an event out of K2.

 

I have a view with a Google Map, the user types in a Lat and Long and I have some custom Javascript which traps the change event and moves a marker on the map to the desired location.

 

The user also has an Autocomplete on my location table. The autocomplete does a Transfer Data to set the same Lat and Long text boxes. The problem is updating a text box with a K2 rule (or any javascript update) doesn't trigger the change event. Is there a way to trigger a custom javascript event on a Transfer Data or similar rule?

 

I tried listening to ajaxComplete but got nothing.

Hi,


 


The only solution that I can think of for this is to manually trigger the javascript yourself after you executed the rule to transfer the data to your 2 text boxes.


 


You can follow the steps listed here to execute the javascript manually.


I did not know that injecting a script into a blank field (repeatedly) would run the script! Excellent.


Reply