Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6748181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:32:05+00:00 2026-05-26T12:32:05+00:00

There is an ASP page on work intranet that returns data from numerous sensors.

  • 0

There is an ASP page on work intranet that returns data from numerous sensors. The data is presented in table format with several rows and columns.

I thought it would be cool if I could display a few of the outputs on our department website.

I would like to use ajax to open the ASP page and get a few data points from the resulting table.

Opening up the page with AJAX was easy enough, but I’m not sure what to do with it after that.

The table is formatted like so:

<table>
  <tr>
    <td>Data ID 1</td>
    <td>Description</td>
    <td>Data</td>
  </tr>
  <tr>
    <td>Data ID 2</td>
    <td>Description</td>
    <td>Data</td>
  </tr>
</table>

The first cell in each row is a unique ID, then the 5th column in the same row has the value I want.

function loadXMLDoc()
{
    var xmlhttp;

    if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    } else {// code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }

    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) {
            document.getElementById("testDiv").innerHTML=xmlhttp.responseText;
        }
    }

    xmlhttp.open("GET","http://plantdata/showData.asp",true);
    xmlhttp.send();
}

How can I grab the data by the unique ID?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:32:06+00:00Added an answer on May 26, 2026 at 12:32 pm
    xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4 && xmlhttp.status==200) {
        var target = document.getElementById("testDiv");
        target.innerHTML = xmlhttp.responseText;
        extractIDs(target);
      }
    }
    
    function extractIDs(container) {
      var trs = container.getElementsByTagName("TR");
    
      for (var i=0; i<trs.length; i++) {
        var tds = trs[i].getElementsByTagName("TD"),
            txt = tds[0].textContent || tds[0].innerText;  // innerText for IE
    
        alert("row " + (i+1) + ": " + txt);
      } 
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote an ASP.NET page that imported data from an Excel spreadsheet without any
In this asp.net page, there is a link that leads to another page in
I have an ASP.NET page A that uses a data layer assembly DAL .
It seems that Intellisense just doesn't work within attributes in an ASP.NET page. I
At my place of work, we have an ASP.NET page that uses the following
Is there any firefox addon which can display my asp.net page viewstate size.... Any
http://biochrom.fivesite.co.uk/catalogue4.asp On the page above there is an image floated to the left. To
In classic ASP there is a global object called Application that is accessed simultaniously
Is there an ASP.NET MVC portal that is either commercially available or open source?
The company that I work for is making a transition between classic ASP programs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.