function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<apex:page standardcontroller="Account"> <apex:form > <apex:pageBlock > Expected price : <apex:inputText id="inptpriceID"/> <apex:commandButton onclick="validateFunction('{!$Component.inptpriceID}')" value=" Submit Price"/> </apex:pageBlock> </apex:form> <!-- Java script starts Here --> <script> function validateFunction(amountinputID){ var inputAmount = document.getElementById(amountinputID).value; if(inputAmount == ''){ alert('Please enter amount before submitting price'); } } </script> <!-- java script ends here --> </apex:page>
http://sfdcsrini.blogspot.com/2014/09/javascript-validation-in-visualforce.html
http://www.infallibletechie.com/2013/01/how-to-write-javascript-validation-for.html
https://opfocus.com/javascript-validation-in-a-visualforce-page/
https://gist.github.com/the1mattkaufman/6fb978f2de3c7c0cf921a137ed3ac265
http://gokubi.com/archives/using-javascript-to-validate-an-apex-form