473,574 Members | 5,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to insert a row dynamically in a table which already exists in the page?

129 New Member
Hello friends,
What my doubt is, a page is already designed in that page a table exists, and i am doing a script like a radio button exixts and when click that radio button some function is called and in that function i want to create a extra row in that table which already exists on page. That is my problem.

How to insert a row dynamically in a table which already exists in the page?
Nov 11 '08 #1
7 5409
16,027 Recognized Expert Moderator MVP
You can use the insertRow() method.

PS. please use a good thread title. I've changed it to better describe the problem.
Nov 11 '08 #2
129 New Member
Thank you my friend i change how to put better title for questions.
But can you help me with some sample code.

Ok i got the sample code but it inserts a row on top of the table, but i want to add a row in middle of table i.e after some fields.
Nov 11 '08 #3
16,027 Recognized Expert Moderator MVP
Use the index to add the row at the specified position, e.g. insertRow(2) would add above the third row.
Nov 11 '08 #4
129 New Member
Hai friend,
Thanks for helping me but one another doubt if i want to modify a column of a row already existed in the table, how to do this? Is there any function like selectRow etc.....
Nov 12 '08 #5
16,027 Recognized Expert Moderator MVP
Once you have the row, use the the cells[] array to get the cells within a row and use the index to get the column you're after. To modify it, you can simply use its innerHTML property.
Nov 12 '08 #6
129 New Member
Thank you my friend its working. Thank you.
Nov 12 '08 #7
16,027 Recognized Expert Moderator MVP
You're welcome. Glad to help :)
Nov 12 '08 #8

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

Similar topics

by: Jonathan | last post by:
I am looking for a simple way to check if a database table exists. I keep getting advice to use "Try.. Catch" and other error handling methods, but I obviously don't want to have to display an error message and stop the process every time someone loads the script after the table is created because that would mean the page could only ever run...
by: shottarum | last post by:
I currently have 2 tables as follows: CREATE TABLE . ( mhan8 int, mhac02 varchar(5), mhmot varchar(5), mhupmj int )
by: Jean-Christian Imbeault | last post by:
I have a table with a primary field and a few other fields. What is the fastest way to do an insert into that table assuming that sometimes I might try to insert a record with a duplicate primary key and want that to fail? I know that if I try a plain insert this will work, but in the case where I am trying to insert a duplicate key, the...
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 must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then...
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 error "An unexpected token "CREATE TRIGGER Test_INS INSTEAD OF" was found following "BEGIN-OF-STATEMENT"."
by: Chris Kratz | last post by:
Hello all, We have run into what appears to be a problem with rules and subselects in postgres 7.4.1. We have boiled it down to the following test case. If anyone has any thoughts as to why this would be happening, we would appreciate feedback. We have tested on 7.3.4, 7.3.6 and 7.4.1 and all exhibit the same behavior. Test case one...
by: Kevin Lawrence | last post by:
Hi all I want to do "INSERT INTO Table (Blob) Values('blobdataasstring')". ...rather than using the parameter driven method, is it possible? And if so what encoder do I use to convert the bytes to string format? Thanks Kev
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am using MS-Access 2000 database table for this app. Note that the datatype of all the fields mentioned above are Text. Apart from the above columns,...
by: sukatoa | last post by:
Good day, I dont know if this would be called a special case since this will be my first time to have an idea where i would like to insert a value from the table with a condition Is it possible? For example: I have a table 'tablename', and has a column 'values' and expected to put millions of unique values in that table. The...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.