...

how to display textbox entered value and with related values in textare using javascr

vsiddi
07-08-2011, 02:54 PM
Hi friends,

i have xnl file like

<DATAPACKET >
<data1>
<R_ID>101</R_ID>
<R_PRE>38</R_PRE>
<R_PRE2>39</R_PRE2>
<R_TEMP>8.35</R_TEMP>
<R_TENP2>0.64</R_TENP2>
</data1>
<data1>
<R_ID>102</R_ID>
<R_PRE>36</R_PRE>
<R_PRE2>37</R_PRE2>
<R_TEMP>7.23</R_TEMP>
<R_TENP2>1.21</R_TENP2>
</data1>
<data1>
<R_ID>103</R_ID>
<R_PRE>34</R_PRE>
<R_PRE2>36</R_PRE2>
<R_TEMP>7.21</R_TEMP>
<R_TENP2>1.95</R_TENP2>
</data1>
<data1>
<R_ID>104</R_ID>
<R_PRE>32</R_PRE>
<R_PRE2>35</R_PRE2>
<R_TEMP>6.25</R_TEMP>
<R_TENP2>2.30</R_TENP2>
</data1>
<data1>
<DATAPACKET >

then i have textbox...when i type 101 its go and get all data in the row in text area like

101
32
6025
2.30

please give me any idea how to do this

i m try this
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", "Refrigerater.xml", false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML;
x = xmlDoc.getElementsByTagName("ROWDATA");

//x = xmlDoc.getElementsByTagName("data1");

function displayInfo(selBox) {
x = xmlDoc.getElementsByTagName("ROWDATA");
var col = (selBox.options[selBox.selectedIndex].text);
document.getElementById("show").innerHTML = "&nbsp;" + col;
}

Please resolve my problem

Thanks
Venkat.S

Kor
07-08-2011, 03:27 PM
then i have textbox...when i type 101 its go and get all data in the row in text area like

101
32
6025
2.30

But all your <R_ID> tags have 101 as inner text. You need an extra filter to get some data from a certain <data1> group. Typing 101 is not enough.

vsiddi
07-08-2011, 03:46 PM
sory KOR..


i change now my tag please find it



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum