You need to sign in to do that
Don't have an account?
Irish@acc
pop up window to ask user for input either yes/No
Hi I'd like to create a pop up window which will have to value either Yes or No and when the user click on "Yes" it creates the Record and when the user click on NO nothing will happen...
please help me on this...this I want to achieve in javascript
try this.
All Answers
Hi,
You can use this
function confirmYesNo() {
var isCancel = confirm("Are you sure you want to create new record?");
if (isCancel){
CallApexMethod();
return true;
}
<apex:actionFunction name="CallApexMethod" action="{!addNewRecord}" >
</apex:actionFunction>
<apex:commandButton onclick="return confirmCancel()" title="Add New Record" Style="color:#fff;"/>
This is invoking apex method(addNewRecord) through javascript. And there is a confirmation screen will come after clicking the button. If you click Ok then it will call the apex method.
If this post solves your problem, kindly mark it as solution.
Thanks
How do i use this in my Code...
below is my code but it's not asking for confirmation ..I'd like to use a confirmation here before creating the record....
Hi
you need to write like this
I have not checked your complite code, you need to do that
if this post answers your question then please mark it as solutions so that It can be further referred .
If this post really helps you then hit kudos
Thanks
try this.
This is exactly what I was looking for..thanks
but there is a change...True will be withou quote.