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 7978935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:37:41+00:00 2026-06-04T09:37:41+00:00

I am having a little problem here. I have a <script language =JavaScript runat=server>

  • 0

I am having a little problem here.
I have a <script language ="JavaScript" runat="server"> code that reads a table from a website, parses data and stores it in a 2-D array. It works correctly; I can display the data using Response.Write.

Now, I would like to use the data in the array to construct my own table and display it in the browser. I thought I would just add:

</head> 
<body onload="tableCreator();">
<table id="table" border="1">
    <tr> 
    <td id="Document Number">Document Number</td>
    <td id="Document Link">Document Link</td>
    <td id="Date Filed">Date Filed</td>
    <td id="Date Entered">Date Entered</td>
    <td id="Date Terminated">Date Terminated</td>
    <td id="Description">Description</td>
    </tr>
</table> 
<body> 
</html>

after script ends, but this is where problems start. I don’t know where to insert the tableCreator()function. If I do it inside the (script language =”JavaScript” runat=”server”) code (in order to be able to use the array’s data), the function is not called. When I change the tag to (script language =”JavaScript”) (no runat=”server”), the function is called, but the script isn’t run (I have multiple Response.Write and nothing, but the table, is being printed)

function tableCreator () {
  var table = document.getElementById("table");
  var rowCount = table.rows.length;
  var row;
  row = table.insertRow(rowCount);
  var cell1 = row.insertCell(0);
  cell1.innerHTML = "1";
}

Any ideas?

  • 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-06-04T09:37:43+00:00Added an answer on June 4, 2026 at 9:37 am

    You are confusing server-side code and client-side code.

    JavaScript can’t access a 2d array that’s created on the server (adding runat="server" to you script tag will not give you access to your server-side variables). You would need to serialize the array in your server-side language and then make it accessible to the client (a hidden field would work well for this).

    Alternatively, if you have the data server-side, why create the table client-side. Simply create the table server-side when the page loads.

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

Sidebar

Related Questions

I'm having a little problem here with javascript looping. I have a on click
I have a little newbie problem that I cannot figure out, I am having
I'm having a little problem here! I have discovered the following as being the
today i'm having a little problem, that probably is nothing for pros here :)
I'm having a little problem with this setup here I have a list of
I'm having a little 'teething' problem here is my code so far <form name=job_app>
I'm having a little problem here, I'm new to Actionscript 3, and what I'm
I'm having a little problem with nginx and the Perl FCGI module. I have
I am having a new little problem; I have a little pointer called: int
I'm having a trouble with this little problem. Let's say, I have an array,

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.