You need to sign in to do that
Don't have an account?
Salesforce Developer India
How to create alert popups when inputText is empty using Apex class?
Hi all,
How to create alert popups when inputText is empty using Apex class?
can u please help me and give with example....
Thanks for u r help......
It will show the error message u defined in ur page, u cant create alerts from clss.
U need to write javascript function to do the popups.
Hi,
Try the below Code :
In your apex class :
public boolean blnAlert{get;set;}
public pagereference Save()
{
//Check the Value of your Field if it is null or blank than
blnAlert=true;
return null;
}
In Visualforce page
<script>
if({!blnAlert} == true)
alert('Thiis TextBox can not be Blank');
</script>
did this answer help you.If not than let me know the isse.