+ Start a Discussion
t.deepthi05t.deepthi05 

Clear field Values

Hi,

 

How to clear the field value onclick event using a apex:commandLink without refreshing the page.

 

Thanks & Regards

Best Answer chosen by Admin (Salesforce Developers) 
Dhaval PanchalDhaval Panchal
use

document.getElementById(<your controll name>).value ="";

you can search your control name using firebug.

All Answers

purupuru
Hi,

To clear the value of field you can use the Javascript. On click of apex:commandLink you can call the javascript function to clear the value of field.
OR
Use can use the "reRender" attribute to refresh the particular div/section.

Regards,
Purushottam
t.deepthi05t.deepthi05

no that didnt solve my problem

Dhaval PanchalDhaval Panchal
You can clear value from control using javascript. but if you want to clear value also then you have to rerender that control and also need to create one action in which you have to clear that field.
t.deepthi05t.deepthi05
Can u be bit clear and how to clear the data using java script through command Link
Dhaval PanchalDhaval Panchal
use

document.getElementById(<your controll name>).value ="";

you can search your control name using firebug.
This was selected as the best answer