- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:28 AM
Hi Everyone,
I have an UI action called “Request Document” button. When I click on UI action I would like a popup message to appear that says "Are you sure you want to send this Request Document."
In the popup window, there should be two buttons. “Proceed” and “Cancel”. Clicking on the “Proceed” button will launch process by sending the Request document. Clicking on the “Cancel” button will take back to the current page.
Please help me how to achieve this?
Thanks!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:56 AM
@Rajesh Bandila : Below is the sample code that will help you. Enable client checkbox on UI Action and provide an action name and Onclick function name.
function requestDocument() {
var answer = confirm("Are you sure you want to send this Request Document.");
if (answer == true) {
gsftSubmit(null, g_form.getFormElement(), 'action_name');
} else {
return false;
}
}
if (typeof window == 'undefined') {
// Add your existing server side logic here
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:35 AM
Hi @Rajesh Bandila ,
If ur UI action is client then u can use confirm method the way we use alert in client script.
It will give u a popup with OK n cancel button.
If pressed ok it will move ahead if pressed cancel it will comeback to that same page.
But u do need to code that.
Attaching one sample link for your reference
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:41 AM
Thanks for your response @Danish Bhairag2
Currently my ui action is Server side script. Could you please provide the code for that? It will help full for me to move further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 10:56 AM
@Rajesh Bandila : Below is the sample code that will help you. Enable client checkbox on UI Action and provide an action name and Onclick function name.
function requestDocument() {
var answer = confirm("Are you sure you want to send this Request Document.");
if (answer == true) {
gsftSubmit(null, g_form.getFormElement(), 'action_name');
} else {
return false;
}
}
if (typeof window == 'undefined') {
// Add your existing server side logic here
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 09:59 PM
Thanks for your response @Sainath N
Code is working as expected and In the pop up message buttons are showing "OK" and "Cancel". here my question is, how to place the "Proceed" button in place of "OK"? or Can we replace it to "OK" to "Proceed"?