mthama
Posts: 15
Joined: Mon Feb 10, 2014 1:49 pm

How to trigger custom actions with Edit text changes?

Hi all,

We're in need to do a HTTP post into an URL, which returns a boolean value. We're already contextualized with the custom actions "send install information to your web server" and with the "HttpPostServerResponse" property. Our problem comes with the manner that we need to do this:
1. We have, in the same dialog (a kind of form), an Edit, a ImageCheckBox, and a Text;
2. Whenever the user changes the text content within Edit, it must check its content;
3. The installer must show/hide the Text and the ImageCheckBox, according to the evaluation of the Edit content;
4. The Edit evaluation must be done through web service, as it makes validation given present/absent data from our databases.

Is this scenario possible to be build with AI?
Many thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to trigger custom actions with Edit text changes?

Hello,

I'm afraid we don't have predefined functionality for this. However, in order to achieve what you want you can try to create your own HTML page with the above functionality and add it on a HTML Host control.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mthama
Posts: 15
Joined: Mon Feb 10, 2014 1:49 pm

Re: How to trigger custom actions with Edit text changes?

Hi Daniel, thanks for the suggestion.

I'm researching the approach to create a specific installation dialog hosted in the internet that executes the POST action and renders every user input view. Based in the approach of using HTML Host, I'd like to know if it is possible to know, from the HTML Host side, informations set on it by the AI environment. I was wondering to use HTML Host to grab the Text Change event and so wondering if I'm able to:
1. Having a HTML page hosted somewhere in WWW (internet) environment with fields and buttons, can I create a button (in the html page) that makes the AI to proceed to some dialog? In other words, is it possible for AI to go ahead with a submit performed by a html button?
2. Is it possible for the AI to get data information set on a html page so to use them for writing/saving into registries?

Thank you in advance.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to trigger custom actions with Edit text changes?

Hello,
1. Having a HTML page hosted somewhere in WWW (internet) environment with fields and buttons, can I create a button (in the html page) that makes the AI to proceed to some dialog? In other words, is it possible for AI to go ahead with a submit performed by a html button?
Yes, this is possible. In order to achieve this you can use the external.MsiPublishEvents(aControlName) function prototype. This function will execute all published events added on a control from the current MSI dialog (where the HTML is hosted). So, you can add a control button (you can set it to be invisible) on your current dialog and, then on its published events list you can add a published event like this:
  • Event: Display a specific dialog
    Argument: MyDialog
Lastly, you should use the "external.MsiPublishEvents" function inside your HTML page to trigger all published events from your MSI control button.
2. Is it possible for the AI to get data information set on a html page so to use them for writing/saving into registries?
Yes, this can also be done. For this you can use the external.MsiSetProperty(aPropName, aPropValue) function prototype to set the desired installer property, which can be then used on "Registry" page to add registry values.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”