473,570 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

clear boxes

I have these text boxes that start with a check box:
[X] [text_A_1] [text_A_2] [text_A_3] [text_A_4]
[X] [text_B_1] [text_B_2] [text_B_3] [text_B_4]
[X] [text_C_1] [text_C_2] [text_C_3] [text_C_4]
[X] [text_D_1] [text_D_2] [text_D_3] [text_D_4]
I want to clear boxes in a row.
user clicks on first check box, that row of text boxes clears
here's the code:
<html>
<head>
<script language='javas cript'>
function clearItem(thisO ne) {
var thatOne=3;
document.up_dat a.A[2].value='xx'
}
}
</script>
</head>
<body>
<form name="up_data" method="POST" action="notes.c gi">

<input type="checktext " name="chkA0" onclick='clearI tem("A")'>
<input type="text" name="A1">
<input type="text" name="A2">
<input type="text" name="A3">
<input type="text" name="A4">

<input type="checktext " name="chkB0" onclick='clearI tem("B")'>
<input type="text" name="B1">
<input type="text" name="B2">
<input type="text" name="B3">
<input type="text" name="B4">
..... etc...

<input type="submit"> <input type="reset">
</form>
Jul 20 '05 #1
2 5112

"Ben Dover - Mental Patient 0057"
<Be*******@psyc hiatric-center.Bellevue-Hospital.com> wrote in message
news:3F******** *******@psychia tric-center.Bellevue-Hospital.com...
I have these text boxes that start with a check box:
[X] [text_A_1] [text_A_2] [text_A_3] [text_A_4]
[X] [text_B_1] [text_B_2] [text_B_3] [text_B_4]
[X] [text_C_1] [text_C_2] [text_C_3] [text_C_4]
[X] [text_D_1] [text_D_2] [text_D_3] [text_D_4]
I want to clear boxes in a row.
user clicks on first check box, that row of text boxes clears
here's the code:
<html>
<head>
<script language='javas cript'>
function clearItem(thisO ne) {
var thatOne=3;
document.up_dat a.A[2].value='xx'
}
}
</script>
</head>
<body>
<form name="up_data" method="POST" action="notes.c gi">

<input type="checktext " name="chkA0" onclick='clearI tem("A")'>
checktext???
<input type="text" name="A1">
<input type="text" name="A2">
<input type="text" name="A3">
<input type="text" name="A4">

<input type="checktext " name="chkB0" onclick='clearI tem("B")'>
<input type="text" name="B1">
<input type="text" name="B2">
<input type="text" name="B3">
<input type="text" name="B4">
.... etc...

<input type="submit"> <input type="reset">
</form>


Try something like this:

<html>
<head>
<script language='javas cript'>
function clearItem(thisO ne){
var fset = document.getEle mentById(thisOn e);
var inputs = fset.getElement sByTagName("inp ut");
for (var i = 0; i<inputs.length ; i++)
inputs.item(i). value="";
}
</script>
</head>
<body>
<form name="up_data" method="POST" action="notes.c gi">

<input type="checkbox" name="chkA0" onclick='clearI tem("A")'>
<fieldset id="A">
<input type="text" name="A1">
<input type="text" name="A2">
<input type="text" name="A3">
<input type="text" name="A4">
</fieldset>
<br>

<input type="checkbox" name="chkB0" onclick='clearI tem("B")'>
<fieldset id="B">
<input type="text" name="B1">
<input type="text" name="B2">
<input type="text" name="B3">
<input type="text" name="B4">
</fieldset>
<input type="submit"> <input type="reset">
</form>


Jul 20 '05 #2


Vjekoslav Begovic wrote:

"Ben Dover - Mental Patient 0057"
<Be*******@psyc hiatric-center.Bellevue-Hospital.com> wrote in message
news:3F******** *******@psychia tric-center.Bellevue-Hospital.com...
I have these text boxes that start with a check box:
[X] [text_A_1] [text_A_2] [text_A_3] [text_A_4] ............... ...
<form name="up_data" method="POST" action="notes.c gi">

<input type="checktext " name="chkA0" onclick='clearI tem("A")'>
checktext???


checkbox. damn. can't believe I did that.
<input type="text" name="A1">
<input type="text" name="A2">
...........

Try something like this:

<html>
<head>
<script language='javas cript'>
function clearItem(thisO ne){
var fset = document.getEle mentById(thisOn e);
var inputs = fset.getElement sByTagName("inp ut");
for (var i = 0; i<inputs.length ; i++)
inputs.item(i). value="";
}
</script>
</head>
<body>
<form name="up_data" method="POST" action="notes.c gi">

<input type="checkbox" name="chkA0" onclick='clearI tem("A")'>
<fieldset id="A">
<input type="text" name="A1">
<input type="text" name="A2">
<input type="text" name="A3">
<input type="text" name="A4">
</fieldset>
<br>

<input type="checkbox" name="chkB0" onclick='clearI tem("B")'>
<fieldset id="B">
<input type="text" name="B1">
<input type="text" name="B2">
<input type="text" name="B3">
<input type="text" name="B4">
</fieldset>
<input type="submit"> <input type="reset">
</form>


yup. that works.
thankx.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11402
by: T. Wintershoven | last post by:
Hello, I have a few textboxes placed on a SSTab control devided over 3 tabs Is there a way to clear all textboxes in one time in stead of one by one. Someone told me "Use for each item in.........." ??????????? T.i.a.
4
1687
by: Jack | last post by:
I finally discovered where all of the blue boxes in my IDE are coming from after, once again, accidently hitting "Mark All" in a Find in the Visual Studio.NET IDE. However, there is no "Unmark All". Does anyone know how to clear these?
1
2139
by: bestafor | last post by:
I have created, in Borland c++ builder 5.0, a dialog box With 24 CheckBoxes, named CheckBox1 through CheckBox24. My question is how may I clear all Twenty-four CheckBoxes by pressing a “Clear” button?
2
1168
by: Lal | last post by:
dear all On my project all forms have 10-25 text boxes, i want to clear these text boxes. insted of typing .clear on every text boxes any single command for a particular form i am new in .net please help me
3
4681
by: yakuza | last post by:
hi, i want to know how to clear select boxes if i unselect a check box. sample of form code <input type="checkbox" name="truk" value="5"> <select name="day"> <option value=""></option>
0
1283
by: gav1972 | last post by:
Working on this piece of code but when i click on my add button in the form the text boxes that i am using do not clear and so i can't add a new record any help would be great. The code for my data tier and app is below thanks. Data tier Public Class VideoData Public Function getMovies(ByVal strName As String) As DataSet ...
4
6019
by: Chansen | last post by:
I have a form with mulitple combo boxes that populates criteria in a query. I want to add a button to clear the selections in all of the combo boxes. What code do I use? Thanks!
32
2769
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put some new ones on. In my code I am doing the following: For Each ctrl In tpMain.Controls If TypeOf (ctrl) Is CheckBox Then If...
1
1793
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 the values entered in al the textboxes Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load If...
0
7726
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7948
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8150
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5523
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5247
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3682
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3671
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.