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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:10:34+00:00 2026-06-18T02:10:34+00:00

Having a table like… <table border=1 style=width: 100% id=mytab1> <tr id=A1> <td>100</td> <td>John</td> <td>Doe</td>

  • 0

Having a table like…

<table border="1" style="width: 100%" id="mytab1">
<tr id="A1">
    <td>100</td>
    <td>John</td>
    <td>Doe</td>
    <td>Someplace</td>
    <td>
        <input type="submit" value="Submit" />
    </td>
</tr>
<tr id="A2">
    <td>101</td>
    <td>Jane</td>
    <td>Doe</td>
    <td>Someplace</td>
    <td>
        <input type="submit" value="Submit" />
    </td>
</tr>

I’m trying to get the value of the first cell in a row, in which I’ve pressed the “Submit” button. I’m a newbie in this. This is an example, but I’m really working on a dynamically created html table in a jsp page, similar to this How to get cell data of specific row from the dynamically created HTML table? question. I just can’t get it working.

  • 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-18T02:10:35+00:00Added an answer on June 18, 2026 at 2:10 am

    This type of work javascript does very well.

    1. Change submit to buttons with handler;
    2. Put the handler into head

    The resulted code:

    <html>
    <head>
    <script>
    function submitter(btn) {
        var param = btn.parentElement.parentElement.id;
        var myForm = document.forms["myForm"];
        myForm.elements["param"].value = param;
        myForm.submit();
    }
    </script>
    </head>
    <body>
    <form action="#someurl" id="myForm">
    <input type="hidden" name="param" />
    <table border="1" style="width: 100%" id="mytab1">
    <tr id="A1">
        <td>100</td>
        <td>John</td>
        <td>Doe</td>
        <td>Someplace</td>
        <td>
            <input type="button" value="Submit" onclick="submitter(this)" />
        </td>
    </tr>
    <tr id="A2">
        <td>101</td>
        <td>Jane</td>
        <td>Doe</td>
        <td>Someplace</td>
        <td>
            <input type="button" value="Submit" onclick="submitter(this)" />
        </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML table like the below; <table style=width: 100%> <tr> <td style=width:
I am having a table with records like this in MS Access: ID field2
Having a XMLTYPE column in an Oracle table, I would like to update the
I have a table like this: +-------+---------+------+-----+---------+-------+ | Field | Type | Null |
Having a SQL table like UserID |Attribute | Value 1 |Username | Marius 1
iam having a table with columns like id || counter if i do something
I'm having a table looking something like this: CREATE TABLE `Calls` ( `calendar_id` int(11)
I'm having a table with one XML column. I'd like to filter out the
I need some help to build SQL Query. I have table having data like:
I need some help to build SQL Query. I have table having data like:

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.