473,405 Members | 2,415 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,405 software developers and data experts.

how to insert data into existing table row

Hi everyone,

I would like to know about how to insert data into existing table row.
here is my javascript file.

Expand|Select|Wrap|Line Numbers
  1. function addDataToRows(tableID,noOfRows,data) {
  2.     var table = document.getElementById(tableID);
  3.     var rowCount = table.rows.length-noOfRows;
  4.  
And i want to insert data to that row.

Thanks and Regards
Yan Paing
Mar 26 '10 #1
1 6143
RamananKalirajan
608 512MB
Hi Yan,
I am just considering that there is only one 'td' in ur table and i had wrote a script for that. This is the way you have to add dynamic data.

Expand|Select|Wrap|Line Numbers
  1.   var myTab = document.getElementById(tableID);
  2.    var row=myTab.rows.length; 
  3.    var y=myTab.insertRow(row);
  4.  
  5.    var a=y.insertCell(0);
  6.    var xx= document.createElement('input');
  7.    xx.type="text";
  8.    a.appendChild(xx); 
If you have more no of td's means u can insertCell(n). You have to repeat it again.

Thanks and Regards
Ramanan Kalirajan
Mar 26 '10 #2

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

Similar topics

16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
2
by: Alex | last post by:
Hi, I need to create a trigger that will trap the insert commands on a table and if the row already exists, it updates the information. I started with this exemple but im getting syntax...
4
by: ams | last post by:
I set up a database of civic league members and residences. I set the primary key to conform to addresses by street numbers. Unfortunately, I omitted two buildings. How do I insert the data for...
3
by: Bob Alston | last post by:
I have a routine to copy data to new versions of my app via insert into sql statements. Unfortunately, due to evolution of my app, sometimes the new version has more restrictive editing than an...
1
by: zierde01 | last post by:
I read topic the followoing topic: http://www.thescripts.com/forum/thread143458.html and the people attempting to help requested further code/documentation to assist in resolving the problem. I...
13
by: shankindc | last post by:
Hi, I have a data entry form which opens default values each time the form is open. Requirement is that users can edit existing data in the form. When the form is closed, it shouldnt update the...
0
by: tezza98 | last post by:
HI i am using BULK INSERT to copy data from a text file into a table that already exists BULK INSERT dbo.TRANStemp FROM 'D:\MSSQL\Data\TRANS.csv' WHERE dbo.TRANStemp.DateTime <> ...
0
by: mwenz | last post by:
I am trying to update an Access table using OLEDB in VB.Net 2005. I can add rows but I cannot update them. Code to instantiate the Access database and table... Dim conn As New...
1
by: Madmartigan | last post by:
Hi I have a question from college that requires me to write a script that will copy data from an existing table into 4 related tables. The related tables have been created from normalisation. The...
7
by: anu b | last post by:
Hi I need to use Clr trigger for insert command My code is as below I am using SQL server 2005 and VS 2008.... but after running this code i didnt get the result as i expexted it shows the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.