When a specific button on the toolbar is pressed, I am using radprompt to solicit input from the user.
If they press OK, I want to retrieve the input text and pass it along to the server side code and if they cancel, do nothing.
I have everything working with the exception of being able to conditionally execute the server code based upon the user input.
Within the onclientbuttonclicked function I use .get_item().get_text to validate which button was pressed and then invoke radprompt, which displays and returns the input to the callback function but it also invokes my server-side code within the toolbar's _ButtonClick event. How can I make the _ButtonClick event conditional for this one button? (there are several buttons on the button bar, some conditional to user input, most are not).
If they press OK, I want to retrieve the input text and pass it along to the server side code and if they cancel, do nothing.
I have everything working with the exception of being able to conditionally execute the server code based upon the user input.
Within the onclientbuttonclicked function I use .get_item().get_text to validate which button was pressed and then invoke radprompt, which displays and returns the input to the callback function but it also invokes my server-side code within the toolbar's _ButtonClick event. How can I make the _ButtonClick event conditional for this one button? (there are several buttons on the button bar, some conditional to user input, most are not).
function toolbarButtonClicked(sender, args) { |
if (args.get_item().get_text() == "Close") |
radprompt("Enter the resolution or press CANCEL if you do NOT want to CLOSE this ticket.", promptCallBackFn, 330, 110, sender, "Resolution", null); |
return false; |
} |
function promptCallBackFn(arg) { |
if (arg==null) |
//do nothing |
else |
//execute server-side code in _ButtonClick event |
} |