Hi,
This is for small trick that how button click when we press enter in text field.
Small but very use fully.
<apex:inputText value="{!text}" id="textId" onkeypress="if (event.keyCode == 13) { ClickOn(); }"/>
<apex:CommandButton Id="BTN" styleClass="BTN" action="{!a}" />
<script>
function ClickOn(){
$('.BTN').click();
}
</script>
Thanks
Ashlekh Gera.
No comments:
Post a Comment