Archive: is it possible to pop-up a message box on clicking a link?


is it possible to pop-up a message box on clicking a link?
In my installer, there are certain prerequisite checks performed on the server before the installation proceeds.
For every check, if it fails, a link next to the check is activated which says "Click here for more information" and takes user to one of the pages on our site where additional information is provided to meet that prerequisite.
However, for one of the checks, I am planning to just provide a message box pop-up when the user hits the "click here for more information" link.
Is it possible to do that or will I have to use a button instead? I just want it to be consistent in behavior with the other checks so am inclined towards using a 'link' field.
Any help, suggestions, comments are greatly appreciated.

Thanks


Use the NOTIFY flag for the link and leave STATE empty. This way, your leave function will be called and [Settings]\STATE will be set the field number of the link.


Thanks for your prompt response Kichik.
But, I think I am missing something here as I am not able to follow what you have mentioned.
Here are the lines of code:
WriteINIStr "$PLUGINSDIR\prereq.ini" "Field 18" "Text" "Click Here for More Information"
WriteINIStr "$PLUGINSDIR\prereq.ini" "Field 18" "Flags" "NOTIFY"
WriteINIStr "$PLUGINSDIR\prereq.ini" "Field 18" "State" ""

Now, if I want to pop-up the message box when the user clicks this link, what else do I need to do?

Thanks Again


in the leave callback function for your page, you need to check the state value in the settings section so you can detect if the user clicked the link (in this case, show the messagebox and then call abort) or if the user clicked the next button (do nothing in this case)

see \NSIS\Examples\InstallOptions\testnotify.nsi for an example


Thanks Anders, the example really helped.
It comes out that I was not using the Leave function appropriately.
:-)