473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1872
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

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

Similar topics

1
by: Stefan Mueller | last post by:
I'd like to read and modify a cell (e.g. 'Text 1') in the following HTML table with a JavaScript: ============================================== <html> <body> <table id = "MyTable"> <tr id...
5
by: Aaron Ackerman | last post by:
I have a bound combobox the appears on a cell within the column of my bound grid when the user clicks on a cell n(In my vb.net WinForm app). I am trying to allow the adding of an item to that bound...
11
by: Daz | last post by:
Hello everyone. I am sure the answer to my question is simple, but I can't seem to dynamically add an onClick event to my script. I have a table which is generated dynamically, I am just...
1
by: softeng | last post by:
hey...can any body solve my problem.in my application i have a requirement of adding new rows dynamically.each row contains 4 text feilds.and in that 2 text feilds are used to enter date.i want to...
1
by: Steve2007 | last post by:
Hi I have the following form in my html page: <form name="mapserv" method=GET action=""> <input type="hidden" name="timeFiltering"> <input type="hidden" name="filteringType"> <input...
5
by: Liquidtouch | last post by:
I'm not much of a HTML or Javascript programmer but have a little experience just hacking away at it. I am creating a HTML application and would like to be able to add or remove rows of a table....
4
by: Lewis Holmes | last post by:
Hi I have the following situation in one of my asp.net pages. The user can add multiple table rows to a form by selecting a button. These rows can contain asp.net controls. When this button is...
1
by: Noorain | last post by:
i add row dynamiccaly but value doesn't pprint. please help me. My coding is as follow <HTML> <HEAD> <TITLE> Add/Remove dynamic rows in HTML table </TITLE> <SCRIPT...
1
by: vivek kapile | last post by:
Title:Dynamically adding table row with a checkbox using JavaScript Author:Vivek Kapile Email:snipped Language:JavaScript Platform:JavaScript in ASP.net Technology:Used in ASP.net...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.