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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:35:48+00:00 2026-06-10T14:35:48+00:00

This is my diploma project, and I want to insert a row at the

  • 0

This is my diploma project, and I want to insert a row at the start with a choose equipment select but I don’t know how to use jQuery.

<form>
    <table border="1">
        <tr>
            <td>Kod Peralatan</td>
            <td>Nama Peralatan</td>
        </tr>
        <tr>
            <td>
                <select>
                    <option>Choose Equipment</option>
                </select>
            </td>
            <td>&nbsp;</td>
        </tr>
    </table>
    <table>
        <tr>
            <td align="right">
                <button type="button">Add Row</button>
            </td>
        </tr>
    </table>
    </center>
</form>
  • 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-10T14:35:50+00:00Added an answer on June 10, 2026 at 2:35 pm

    I think this is what you may be looking for.
    This will dynamically add a new row to your equipment table, and create a new drop down list, which is populated.

    <!DOCTYPE html>
    <html>
    <head>
        <title>Equipment</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
        <script type="text/javascript">
            var rows = 0;
            function addMoreEquipment() {
                rows++;
                var options = [{ name: "Item 1", value: "1" }, { name: "Item 2", value: "2" }, { name: "Item 3", value: "3" }];
                var row = $("<tr id='row"+ rows +"'><td><select id='equipment" + rows + "'></select></td><td><a href='#' onclick='removeRow(\"row" + rows + "\")'>Remove</a></td></tr>")
                $("#equipment").append(row);
                for (var i = 0; i < options.length; i++)
                    $("#equipment" + rows).append(new Option(options[i].name, options[i].value));
            }
            function removeRow(id) {
                 $("#" + id).remove();
            }
            $(document).ready(function() {
                addMoreEquipment();
            });
        </script>
    </head>
    <body>
        <form>
            <table border="1" id="equipment">
                <tr>
                    <td>Kod Peralatan</td>
                    <td>Nama Peralatan</td>
                </tr>
            </table>
            <div style="text-align: right">
                <input type="button" onclick="addMoreEquipment()" value="Add Row">
            </div>    
        </form>
    </body>
    </html>
    

    You can check out the updated JS Fiddle here:
    http://jsfiddle.net/b3gYk/1/

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

Sidebar

Related Questions

This is my first attempt at reverse engineering, and really, I don't know how
This is a difficult and open-ended question I know, but I thought I'd throw
This code is a direct copy-paste from the jquery#faq page <select id=x style=width:200px;> <option>one</option>
This is an example of the code am using. I use a modified version
This is a bit of a long shot, but if anyone can figure it
This is kinda oddball, but I was poking around with the GNU assembler today
This might seem like a stupid question I admit. But I'm in a small
I use a php checkbox and I want to retrieve marked values. My checkbox
This is a super simple issue that I can't figure out. I want to
I want to compare Technical Diploma (±12 years) with the same string present in

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.