You need to sign in to do that
Don't have an account?
Facebook
Resetting a page or Form
Hi,
Can anyone help me in resetting a visualforce page or form by using java script...
i have three textboxes in a form and when the reset button is clicked the values in the boxes should be cleared...
regards,
Abhi
Have you tried setting the button type to 'reset'?
Tryout the code given below :
<apex:page controller=”my_controller”>
<script>
Function resetValue()
{
Var.getElementById(“{!$Component.frm.name}”);
Name.value=’’;
}
</script>
<apex:form id=”frm”>
<apex:outputLabel value=”Name”/>
<apex:inputText value=”{!}” id=”name”/>
<apex:commandButton value=”Reset” onclick=”resetValue();”/>
</apex:form>
</apex:page>
How will we reset if there is a picklist/ look up field?
Thanks buddy. I needed that. Helped me a lot.