You need to sign in to do that
Don't have an account?

How to display message using java script?
Hi All,
I have VF page in which I have one command button if supose user insert the data suceesfully it should display message "Record is inserted" and if some error occur it should display message "Record is not created".
Thanks in advance
I have VF page in which I have one command button if supose user insert the data suceesfully it should display message "Record is inserted" and if some error occur it should display message "Record is not created".
<apex:commandButton action="{!processSelected}" value="Run Template" onComplete="Refresh();"/>
Thanks in advance
You can use pagemessages.
Please see below code for your reference.
Happy Coding!!
Right now that button is in POP up and also right now after clicking the POP it is refreshing the page and the code which you have have given is for simple button without POP up.
Regards,
Uttpal