I have a smal task i.e
I have textbox1 ,botton,textbox2 when i enter 21 value then i click button its get in sama row values in textbox2.
I have xml file like this
then i try this hear i get all values
function gettxt() {
results = new Array;
var searchterm = document.getElementById("searchme").value;
if (searchterm == null || searchterm == "") {
alert("Enter textbox value");
return false;
}
var istrlen1 = searchterm.length;
var tempname1;
if (istrlen1 == 1) {
tempname1 = searchterm;
}
if (istrlen1 == 2) {
tempname1 = searchterm;
}
if (istrlen1 == 3) {
tempname1 = searchterm;
}
if (istrlen1 == 4) {
tempname1 = searchterm;
}
for (i = 0; i < x.length; i++) {
var name = x[i].getElementsByTagName("R_ID")[0].firstChild.nodeValue;
var name1 = x[i].getElementsByTagName("R_NAME")[0].firstChild.nodeValue;
var exp = new RegExp(tempname1, "i");
if (name.match(exp) != null) {
y = y + 1;
results.push(name1);
}
}
textbox2.value = results;
}
I try the above code hear small problom when i enter 21 and click button its display 21,121,123... related values i dont want like that
For example textbox1=21 buttonclick textbox2=R-32,r-407A,r-408A like that i dont want like that
I want textbox1=21 buttonclick textbox2=R-32 only in same row value
please any one knows well in js please resolve my problom

Suthish NairPosted Jul 26, 2011, 3:56 AM
Please work on it..
function ReadXML(inputId, id2, a) {