Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, does anyone know if it's possible to trigger actions from within Extensions? How about doing a dynamic update from Javascript, is that possible?
Well I'm fairly certain updating the model from the JS API is not possible, but I'm pretty sure you can similate a button click from inside an extension. How javascript savvy are you?
What you could do is target the ID or class of the button (if possible...i'm not sure actually if the object IDs are yet available in the html code), and use the following jquery code to similate a click:
$("#your_item").trigger("click");
Another way I've triggered events from extensions (this might not work for what you need) is by changing variables from inside the extension and having triggers on these variables which run actions when the variable is updated.
THis might be a bit roundabout for what you're trying to do, but....that's what I've done before for other purposes.
What kind of actions are you looking to trigger?
I'm looking to trigger a dynamic update through a button.
I assume the QVW/QVS would be setup to support dynamic update on that app? If that's set up properly (and keep in mind this feature is very tricky and delicate), the app will update as soon as the data is changed. Do you want the button to somehow update the data set?
I know I can use buttons to update the model, what I'm looking for is a way to enter information in an extension and then somehow, be able to insert that information into the model.
The only experience I've had with this was where I set up an extension to insert data into the SQL database that held the app's data. This database would then run a job that used the QlikView OCX to insert that data back into the app, which would update itself since it was running dynamic update.
Kind of a weird roundabout way to do itm and obviously not ideal.
Thanks a lot for your input Brian, I just thought there might be a way to do it directly through the JS API or at least be able to trigger a button click from within the extension.
Well I'm fairly certain updating the model from the JS API is not possible, but I'm pretty sure you can similate a button click from inside an extension. How javascript savvy are you?
What you could do is target the ID or class of the button (if possible...i'm not sure actually if the object IDs are yet available in the html code), and use the following jquery code to similate a click:
$("#your_item").trigger("click");
Another way I've triggered events from extensions (this might not work for what you need) is by changing variables from inside the extension and having triggers on these variables which run actions when the variable is updated.
THis might be a bit roundabout for what you're trying to do, but....that's what I've done before for other purposes.
Great, that seems close to what I'm looking for. Thanks again.
Brian, any chance you could share your code about changing variables from within the extension?