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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:15:37+00:00 2026-05-19T01:15:37+00:00

AM using 2 buttons in my Page. Add and Remove If I press Add,

  • 0

AM using 2 buttons in my Page. Add and Remove
If I press Add, a row of text box and a list box should be added.
Remove is used to Undo the Previous operation.

The code I have used is,

var cellRight = row.insertCell(5);

var el = document.createElement('input');

el.setAttribute('type', 'text');

el.setAttribute('name', 'txtRow');

el.setAttribute('size', '15');

cellRight.appendChild(el);

This works well if I use only text box. To add a List box

var cellRight = row.insertCell(6);

var el = document.createElement('input');

el.setAttribute('type', 'select');

el.setAttribute('size', '15');

el.setAttribute('method','onclick');

cellRight.appendChild(el);

I wrote this code, but when I press the “Add” button, only Text Boxes instead of list boxes.
Is my code correct?

  • 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-19T01:15:38+00:00Added an answer on May 19, 2026 at 1:15 am

    There is no <input type="select">. You need to create a select element and add option sub-elements.

    Something along these lines perhaps:

    var el = document.createElement('select');
    el.setAttribute('name', 'txtRow');
    el.setAttribute('size', '15');
    
    var label = document.createTextNode('item1label');
    var opt = document.createElement('option'); 
    opt.setAttribute('value', 'item1value');
    opt.appendChild(label);
    el.appendChild(opt);
    
    cellRight.appendChild(el);
    

    Beware, dry-coded, ymmv.

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

Sidebar

Related Questions

I have Buttons attached to elements on the modules entrypoint html page using RootPanel.get(foo).add(button)
I have a page where the user can edit various content using buttons and
i am adding collection of radio buttons to my page using jQuery below $(document).ready(function()
Using core jQuery, how do you remove all the options of a select box,
I am trying to create a control which contains two listboxes with add/remove buttons
How to Update a div tag in Master Page using a button click in
I'm using my code-behind page to create a save button programmatically: Button btnSave =
I am using an UpdatePaenl in an asp.net page. It has a button to
how to load the other HTML page when i click a button? i'm using
Normally we have login page with username, password filed and signin button. Using the

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.