469,631 Members | 1,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Dynamically adding and editing rows in a table with HTML & JAVASCRIPT

65
Hi All,

Please find the below scenario.

In a html page there are three things, two text boxes and one drop down list and one ADD button. My requirement is when the user enters the value in the text boxes and select some option in the drop down list and if he clicks add means a new html table must be displayed in the same page. If he clicks the entered table row meant that the row need to be edited. The table value must be focused in the relevant text boxes and in the drop down list.

Could any one please help me for this scenario . . . .


Regards,
Nedu. M
Oct 2 '07 #1
1 1784
dmjpro
2,476 2GB
Hi All,

Please find the below scenario.

In a html page there are three things, two text boxes and one drop down list and one ADD button. My requirement is when the user enters the value in the text boxes and select some option in the drop down list and if he clicks add means a new html table must be displayed in the same page. If he clicks the entered table row meant that the row need to be edited. The table value must be focused in the relevant text boxes and in the drop down list.

Could any one please help me for this scenario . . . .


Regards,
Nedu. M

You can find out the solution here :-)
Expand|Select|Wrap|Line Numbers
  1. var tab = document.createElement("table");
  2. var tbody = document.createElement("tobdy");
  3. var row = document.createElement("tr");
  4. var cell = document.createElement("td");
  5. var element = document.createElement("<input>");
  6. tab.appendChild(tbody);
  7. tbody.appendChild(row);
  8. row.appendChild(cell);
  9. cell.setAttribute("atr_name","attr_value");
  10.  
Good Luck!

Kind regards,
Dmjpro.
Oct 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Aaron Ackerman | last post: by
11 posts views Thread by Daz | last post: by
1 post views Thread by softeng | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.