473,499 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get the table row index from table DOM2

Hi all

I have n tr elements in my table. i want to insert some tr in b/w trs.
so i know only row id of particular row( ex: n) and i want to insert at
n+1th position. So i want to find out the row index of my n'th
element.Is there any direct way to find out the index

hope u got my question

Thanks

Dec 5 '05 #1
3 12073
su***************@gmail.com wrote:
Hi all

I have n tr elements in my table. i want to insert some tr in b/w trs.
so i know only row id of particular row( ex: n) and i want to insert at
n+1th position. So i want to find out the row index of my n'th
element.Is there any direct way to find out the index

hope u got my question


Use insertRow:

<URL: http://developer.mozilla.org/en/docs...able.insertRow >

--
Rob
Dec 5 '05 #2


su***************@gmail.com wrote:

So i want to find out the row index of my n'th
element.Is there any direct way to find out the index


A table row element object has a property named rowIndex
<http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-67347567>
and a property named sectionRowIndex
<http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-79105901>
Check the docs there, depending on how your table is structured and
where you want to insert one of those properties might give you what you
are looking for.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 5 '05 #3
Thanx a lot

Dec 5 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
5129
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to...
10
7826
by: John | last post by:
I have a table with two rows. On the first row is a text box and in the second row is an image. I have set the table cellpadding to 0 and cellspacing to 0. The table is leaving extra spaces in the...
9
2748
by: Ed_No_Spam_Please_Weber | last post by:
Hello All & Thanks in advance for your help! Background: 1) tblT_Documents is the primary parent transaction table that has 10 fields and about 250,000 rows 2) There are 9 child tables with...
31
5656
by: Arthur Shapiro | last post by:
I'm the webmaster for a recreational organization. As part of one page of the site, I have an HTML "Calendar at a Glance" of the organization's events for the month. It's a simple table of a...
25
36319
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
7
10789
by: Bing Wu | last post by:
Hi Folks, I have a very large table containing 170 million rows of coordinats: CREATE TABLE "DB2ADMIN"."COORDINATE" ( "FID" INTEGER NOT NULL , "AID" INTEGER NOT NULL , "X" REAL NOT NULL ,...
4
5101
by: sudhaoncyberworld | last post by:
Pl excuse me if my question is silly var tbl=document.createElement('TABLE'); var tr=tbl.insertRow(); tr.id='tr1'; tr.style.borderWidth='thin'; tr.style.borderStyle='ridge';...
2
1398
by: Aaron Gray | last post by:
AFAICT MS IE JavaScript does not support DOM Level 2 Namespaces. Is this correct ? Aaron
4
1707
by: SirCodesALot | last post by:
Hi All, I am trying to dynamically replace a table in the dom, anyone have an idea on how to do this. here is some sample suedo code of what I want to do. var tableHTML = "<table...
0
7215
jinu1996
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...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7385
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...
1
4917
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...
0
4597
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
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...
0
1425
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 ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.