Thanks Bruce.
I have a specific case where I have a form with an added button. The purpose of the button is to send an email based on information in the form data. Using example 11, this was pretty straightforward, and works well.
However, if a data variable in the record has a certain value, then I do not want to send an email, but would rather popup a message telling the user why they cannot send an email, and then return to the form.
What I have been forced to do at the moment is to disable the button if the field value has that certain value. That's workable, I guess, but it requires the user to understand why it is disabled, rather than the system telling them why.
So, what I am trying to get straight is when I click an added button on a Form, what is the best approach in general to do the following:
1. interrogate a variable on the record (or in a session variable)
2. have code (JavaScript I assume) that, on the basis of the variable contents, will popup a message within the browser, or...
3. call a different NT procedure or web page to do the analysis and action taking.
I don't know anything about JavaScript (yet, I suppose) to know if doing something like interrogating a value and calling for one of a multiple set of actions is possible - I assume it is, but how, and is that the best approach?
OR, is it a better approach (for us clarion guys) to have the button click call a NT source procedure that will interrogate a variable and then have it take one of a series of actions?
OR, is there a different, better approach that you would recommend.
I would not be surprised that this is a pretty common question for us clarion guys, and I am slowly getting a better understanding of the "web programming" evironment of NT, but can you give us some practical guidance on how to interrogate a variable on a form when an added button is clicked and take a variety of actions depending on the value in the variable (ie popup, go to a NT procedure, go to a web page, etc).
Does that help clarify?
Mike