Link to home
Start Free TrialLog in
Avatar of techques
techques

asked on

How to remove text in textbox after submit form?

Hi

I have a form with several textbox and submit buttons. The text will be input to DB after pressing the submit button. However, the text is left in the textbox after pressing the submit button.

I want to clear the text in the textbox everytime the submit button was clicked.

How can I do that? with js?
Avatar of smokingspaceman
smokingspaceman

Well you can use server-side and client-side both.

If you want to clear the text from server-side add something like
textbox.text = "" 

If you want to clear the text using client-side java script add an event handler to onClientClick event, that goes through all the textboxes and clear their values.
Avatar of techques

ASKER

can you show me the code to do client-side java script add an event handler to onClientClick event?
ASKER CERTIFIED SOLUTION
Avatar of smokingspaceman
smokingspaceman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial