473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to clear the text fields values

I have a simple struts applications. when I submit the form it inserts into the table and go back to the input screen. I want the html fields to be cleared. They still contain the values that i entered.


how to clear this values.i have to write like this in my formbean.

public void reset(ActionMapping mapping, HttpServletRequest request) {
this.dscpt = null;
this.brokercd = null;
this.lname = null;
this.icno = null;
this.conttitle = null;
this.contname = null;
this.department = null;
this.addr1 = null;
this.addr2 = null;
this.addr3 = null;
this.addr4 = null;
Sep 17 '07 #1
1 2375
r035198x
13,262 8TB
I have a simple struts applications. when I submit the form it inserts into the table and go back to the input screen. I want the html fields to be cleared. They still contain the values that i entered.


how to clear this values.i have to write like this in my formbean.

public void reset(ActionMapping mapping, HttpServletRequest request) {
this.dscpt = null;
this.brokercd = null;
this.lname = null;
this.icno = null;
this.conttitle = null;
this.contname = null;
this.department = null;
this.addr1 = null;
this.addr2 = null;
this.addr3 = null;
this.addr4 = null;
If you are allowed to use Javascript then I think you should use that to clear the fields.
Sep 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: simon_s_li | last post by:
Hi, I have 5 fields in line where I need to drag and drop the text from one field to another field and then all the fields need to re-order themselves. So for instance if I drag the text in...
0
by: TN Bella | last post by:
Hi, Here is part of one sub where I want to clear all textboxes (there are three subs where I do this, one contains more textboxes, the other is below and the final one looks the same but omits...
2
by: Shahid Juma | last post by:
Hi, I tried using Request.Forms.Clear() but it says it is only a read-only property. I have a form and that same form has to be filled out 3 times and what I am trying is to clear the values...
0
by: bienwell | last post by:
Hi all, I have a data entry form in ASP.NET (Web development) which has some fields (field1,..., fieldN) , button ADD THIS RECORD, and button CANCEL. In button ADD THIS RECORD, I have VB.NET...
1
by: micross | last post by:
I have a simple struts applications. when I submit the form it inserts into the table and go back to the input screen. I want the html fields to be cleared. They still contain the values that i...
1
by: johnacooke | last post by:
I have a HTML form that is generated in part by PHP. The action attribute on the form tag calls itself, so that I can validate the fields without using any other form of code like Javascript to...
5
by: karsagarwal | last post by:
I have a bounded form and after I click the button to update/save. THe fields are still there. Is there a way to clear off the fields in the bounded form. Thanks, SA Here's the code that I...
0
by: chandrasekhar | last post by:
Hi I have developed a web page with some controls. I put all of them in session variables. I passed this values in the page. When an user enter some data in form fields and click the buttton ,...
1
by: adarshyam | last post by:
can anybody tel me how to clear values from dynamically created text boxes?? using a clear button.. this is the code used to create dynamic text boxes.. if i press clear button then it must clear all...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.