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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:47:36+00:00 2026-05-15T19:47:36+00:00

I would like to grey out (disable) the previous row(s), every time I add

  • 0

I would like to grey out (disable) the previous row(s), every time I add a new one. Right now I could only disable the first one. Many thanks in advance. Following is what I could do so far:

<head>
<SCRIPTTYPE="text/javascript">
varcount="1";
functionaddRow(in_tbl_name){
vartbody=document.getElementById(in_tbl_name).getElementsByTagName("TBODY")[0];
varrow=document.createElement("TR");
vartd1=document.createElement("TD")
varstrHtml1="<SELECTNAME=\"sel_1\"><optionvalue=\"a\">a<optionvalue=\"b\">b<optionvalue=\"c\">c<optionvalue=\"d\">d</SELECT>";
td1.innerHTML=strHtml1.replace(/!count!/g,count);
row.appendChild(td1);
count=parseInt(count)+1;
tbody.appendChild(row);
myform.sel1.disabled=true;
}
functiondelRow(){
varcurrent=window.event.srcElement;
while((current=current.parentElement)&&current.tagName!="TR");
current.parentElement.removeChild(current);
}
</SCRIPT>
</head>
<body>
<div>
<formaction="#"method="POST"name="myform">
<divstyle="">
<TABLEID="mytable"name="mytable"border="1"STYLE="border-width:1pxorangedashed;background-color:#F0E68C;table-row-width:2;">
<TR>
<TD>
<selectsize="1"name="sel1">
<optionvalue="a">a</option>
<optionvalue="b">b</option>
<optionvalue="c">c</option>
<optionvalue="d">d</option>
</select>
</TD>
</TR>
</TABLE>
</div>
<div>
<INPUTTYPE="Button"onClick="addRow('mytable')"VALUE="Add">
</div>
</form>
</div>
</body>
  • 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-15T19:47:37+00:00Added an answer on May 15, 2026 at 7:47 pm

    Apply a CSS on that row. Row’s don’t have any concept of being “disabled” – they are simply rows. How they appear is driven by CSS.

    Update: If you want to disable the form inputs in the row, simply find that element in the previous row, using e.g. jQuery, or manually (using DOM methods) if the DOM path of the SELECT is always the same.

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

Sidebar

Related Questions

I would like to alter my ham-radio logbook so that every other row is
I would like to remove grey header of the new Popup control in Silverlight
I would like to add two vectors with different lengths in Matlab or Octave.
I have custom placeholders in a textarea and I would like every browser to
A would like to plot geom_tile() without displaying the surrounding grey frame. Example: library(ggplot2)
I would like to add to my website possibilty to clear a div (delete
i would like to get rid of the defualt grey bar which apears at
I would like the text in the textarea to start off grey and turn
I would like to know the width of the dark grey frame on either
Would like to be able to set colors of headings and such, different font

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.