Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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
    Last edited by vsiddi; 07-08-2011 at 03:46 PM.

  • #2
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by vsiddi View Post
    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.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sory KOR..


    i change now my tag please find it


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •