I want to do something like the following in a visualforce page
<apex:inputTextarea id="abc"
value="if('abc'.value().size()>0,alert('Hi'),{!AModel.Comment.Body}"
Can anyone tell me how to achieve this
I want to display an alert if the entered value is null. else I want to pass it to the controller.
AModel.Comment.Bodythis is null or not in your controller and show error message. else when you try to submit/save the page. before calling the controller method, call a javascript function there check this field is empty or not. and based on that show alert message