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

  • Home
  • SEARCH
  • 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 7610993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:33:16+00:00 2026-05-31T01:33:16+00:00

I am using this code: <script type=text/javascript> var id = <?php if(is_numeric($_GET[‘id’])) print $_GET[‘id’];

  • 0

I am using this code:

<script type="text/javascript">

        var id = <?php if(is_numeric($_GET['id'])) print $_GET['id']; else print "0"; ?>;
        var startid = id+1;
        var end = false;

        // function for loading one row
        function getRow(rowid)
        {           
          //$.get("unhandled_one_row.php?id=" + rowid, function(data){ if(data!="\n") $('#dash_table > tbody').append(data); else {  } });

          function HttpRequest(url){
          var pageRequest = false; //variable to hold ajax object

          /*
          if (!pageRequest && typeof XMLHttpRequest != 'undefined')
             pageRequest = new XMLHttpRequest();
          */

          if(window.ActiveXObject)  // Internet Explorer  
          { 
            try
            {
              pageRequest = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e)
            {
              pageRequest = new ActiveXObject("Microsoft.XMLHTTP");
            }
          }
          else  // Firefox, Opera, Safari  
          { 
            pageRequest = new XMLHttpRequest();  
          }

          if (pageRequest){ //if pageRequest is not false
             pageRequest.open('GET', url, false); //get page synchronously 
             pageRequest.send(null);
             embedpage(pageRequest);
             }
          }

          function embedpage(request){
          //if viewing page offline or the document was successfully retrieved online (status code=200)
          if (window.location.href.indexOf("http")==-1 || request.status==200)
          {
             if(request.responseText != "\n") document.write(request.responseText);
             else end = true;
          }
          }

          HttpRequest("unhandled_one_row.php?id=" + rowid);
        }

        // function for deleting a row
        function RemoveRow(obj)
        {
          var rws;
          obj=document.getElementById(obj);
          rws=obj.getElementsByTagName('TR');
          obj.removeChild(rws[rws.length-1]);
        }

        // row loading loop
        do
        {
          getRow(id++);
        } while(!end && document.getElementById("dash_table").clientHeight < document.body.clientHeight - 100);

        // avaiable height exceed control
        // deletes one row if the height was exceeded
        if(document.getElementById("dash_table").clientHeight >= document.body.clientHeight - 100)
        {
          RemoveRow('dash_table');
          id--;
        }

It is supposed to dynamically load a table, row by row, while comparing height of the table with available height of the screen and when the available height is reached, the loop stops. This code works just fine in FF of G.Chrome, but in IE the loop cycles indefinitely.

Why?

  • 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-31T01:33:18+00:00Added an answer on May 31, 2026 at 1:33 am

    OK, after hours of trying possible and impossible I found out that IE (unlike FF or G.Chrome) supports dynamic generation of tables using DOM objects. Using document.write function as I did is not a mistake as far as you don’t need tables’ attributes to update after each row added.
    After learning this, solution was just a matter of several minutes.

    Inside getRow function I put following code:

    var content = request.responseText.split(";");
    
    var row = document.createElement("tr");
    row.className = content[0];
    
    var cell = document.createElement("td");
    cell.innerHTML = content[1];
    row.appendChild(cell);
    
    cell = document.createElement("td");
    cell.innerHTML = content[2];
    row.appendChild(cell);
    

    Let this be the lesson for everyone who will try to generate his table using the easy/lazy way 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using jquery 1.3.2 and this is the code: <script type=text/javascript> //<![CDATA[ jQuery(function(){ jQuery('.news_bullet
I'm using this code: <script type='text/javascript'> $(document).ready(function () { //Check if url hash value
I have index.php like this: <script type=text/javascript src=jquery-1.4.2.js></script> <script type=text/javascript src=ajax.js></script> <a href='one.php' class='ajax'>One</a>
I've got the following code: <script type=text/javascript> $(function(){ $(#AddMaps).submit(function(){ var $form = $('#AddMaps'); $.ajax({
I have this code to show a map using the Virtual Earth API: <script
Im using this code for mysql connection $con = mysql_connect(localhost:/var/lib/mysql/mysql.sock, abc , xyz); if
While using this code to serialize an object: public object Clone() { var serializer
When using this code (simplified for asking): var rows1 = (from t1 in db.TABLE1
Using this code to zip a folder and it works perfect on small files
Im using this code: $(this).css('backgroundcolor', localStorage.getItem('bgColorr') + !important;); When i write: alert( localStorage.getItem('bgColorr') +

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.