By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

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

P: 1
Hi friends,

i have xnl file like

Expand|Select|Wrap|Line Numbers
  1. <DATAPACKET >
  2.   <data1>
  3.     <R_ID>101</R_ID>
  4.     <R_PRE>38</R_PRE>
  5.     <R_PRE2>39</R_PRE2>
  6.     <R_TEMP>8.35</R_TEMP>
  7.     <R_TENP2>0.64</R_TENP2>
  8.   </data1>
  9.   <data1>
  10.     <R_ID>102</R_ID>
  11.     <R_PRE>36</R_PRE>
  12.     <R_PRE2>37</R_PRE2>
  13.     <R_TEMP>7.23</R_TEMP>
  14.     <R_TENP2>1.21</R_TENP2>
  15.   </data1>
  16.   <data1>
  17.     <R_ID>103</R_ID>
  18.     <R_PRE>34</R_PRE>
  19.     <R_PRE2>36</R_PRE2>
  20.     <R_TEMP>7.21</R_TEMP>
  21.     <R_TENP2>1.95</R_TENP2>
  22.   </data1>
  23.   <data1>
  24.     <R_ID>104</R_ID>
  25.     <R_PRE>32</R_PRE>
  26.     <R_PRE2>35</R_PRE2>
  27.     <R_TEMP>6.25</R_TEMP>
  28.     <R_TENP2>2.30</R_TENP2>
  29.   </data1>
  30.   <data1>
  31. <DATAPACKET >
then i have textbox...when i type 101 its go and get all data in the row in text area like

103
32
6025
2.30


please give me any idea how to do this

i m try this
Expand|Select|Wrap|Line Numbers
  1. if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
  2.         xmlhttp = new XMLHttpRequest();
  3.     }
  4.     else {// code for IE6, IE5
  5.         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  6.     }
  7.     xmlhttp.open("GET", "Refrigerater.xml", false);
  8.     xmlhttp.send();
  9.     xmlDoc = xmlhttp.responseXML;
  10.     x = xmlDoc.getElementsByTagName("ROWDATA");
  11.  
  12.     //x = xmlDoc.getElementsByTagName("data1");
  13.  
  14.     function displayInfo(selBox) {
  15.         x = xmlDoc.getElementsByTagName("ROWDATA");
  16.         var col = (selBox.options[selBox.selectedIndex].text);
  17.         document.getElementById("show").innerHTML = "&nbsp;" + col;
  18. }
Please resolve my problem

Thanks
Venkat.S
Jul 8 '11 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
please give me any idea how to do this
how to do what? I donít see a relation between the XML and the JS code does.
Jul 9 '11 #2

Post your reply

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