Hi,

Basically I have a screen where you can add notes to results and you can optionally add these notes to a table within the database called progress notes!

However, you should only be allowed to do this if the user that is logged into the page has a note type associated with them and the included in progress notes check box is select on the screen.

So when the button is pressed I make a call to the database to make sure that the user has a note type, if not a warning dialog needs to be displayed say that they cannot save this note as a progress note if they don't have a note type for their user.

So far I have done the db calls fine however, however the problem is displaying the modal dialog if the above criteria are not met. Because the user can change the status of the check box as many times as they want once the page is loaded thus I need to call the JS function when the user actually clicks the button instead of using the old fashion way and using the button.Attribute.Add method because this will only work if the page is reloaded.

So to cut a long story short.... How do I called a JS function directly from a code behind file ....