473,507 Members | 4,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

table row property DOM2

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';
tr.style.borderColor='blue';
var td=tr.insertCell();
var txt=document.createTextNode('ABC1');
td.appendChild(txt);
var td=tr.insertCell();
var txt=document.createTextNode('ABC2');
td.appendChild(txt);
var tr=tbl.insertRow();
tr.id='tr2';
tr.style.borderStyle='none';
var td=tr.insertCell();
var txt=document.createTextNode('ABC3');
td.appendChild(txt);
var td=tr.insertCell();
var txt=document.createTextNode('ABC4');
td.appendChild(txt);
document.body.appendChild(tbl);

Why i am not able to assign border for particular row

Dec 5 '05 #1
4 5103
su***************@gmail.com wrote:
Pl excuse me if my question is silly

var tbl=document.createElement('TABLE');
var tr=tbl.insertRow();
insertRow requires an argument that is the index at which to insert
the row. An index of -1 will insert the row at the end (effectively
at rows.length).

<URL:http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-39872903>

tr.id='tr1';
tr.style.borderWidth='thin';
tr.style.borderStyle='ridge';
tr.style.borderColor='blue';
var td=tr.insertCell();
The same advice goes applies to insertCell.

<URL:http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-68927016>

var txt=document.createTextNode('ABC1');
td.appendChild(txt);
var td=tr.insertCell();
var txt=document.createTextNode('ABC2');
td.appendChild(txt);
var tr=tbl.insertRow();
tr.id='tr2';
tr.style.borderStyle='none';
var td=tr.insertCell();
var txt=document.createTextNode('ABC3');
td.appendChild(txt);
var td=tr.insertCell();
var txt=document.createTextNode('ABC4');
td.appendChild(txt);
document.body.appendChild(tbl);

Why i am not able to assign border for particular row
That will be better answered in a CSS forum, see the discussion here:

<URL:
http://groups.google.com/group/comp....b2b2935467fd4c


--
Rob
Dec 6 '05 #2
Thanks

Dec 6 '05 #3
My problem is i have a table with n rows. And onmouseover event of that
table i want to show left side border except for some particular rows,
So i can't write this in td of that tr to ignore it, since i have many
td's and it will not fire onmouseover event on all td's at a time. And
it is also not easy to put all those td's into a new table according to
my code, hope u understand my problem

Thanks

Dec 6 '05 #4
su***************@gmail.com wrote:
My problem is i have a table with n rows.
OK.
And onmouseover event
You mean the `mouseover' event. `onmouseover' is merely its handler.
of that table i want to show left side border except for some particular
rows,
Left border of what -- table, row(s) or cell(s)?
So i can't write this in td of that tr to ignore it, since i have many
td's and it will not fire onmouseover event on all td's at a time.
Does not matter. The `mouseover' event will by default bubble up to the
parent `table' element where you can handle it.

<URL:http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MouseEvent>
And it is also not easy to put all those td's into a new table according
to my code,
Why you would have to?
hope u understand my problem


Not really.

Please quote what you are replying to, and trim those quotes:
<URL:http://jibbering.com/faq/faq_notes/pots1.html>

<FAQENTRY>
For Google Groups, click first Options and then Reply.
(This advice should go into the FAQ notes.)
</FAQENTRY>
PointedEars
Dec 6 '05 #5

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

Similar topics

4
3695
by: Matt | last post by:
Hi all, We recently upsized two Microsoft Access Databases to SQL. We're using an ADP (2002) as the front end. All the conversion issues have been resolved, except for one: Whenever we...
25
5133
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...
31
5661
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
36322
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...
3
1964
by: CAD Fiend | last post by:
Hello, I have a land development project that has a many-to-many relationship. I have ONE question regarding table structures, and ONE question on how to make a Form with two Subforms, below. ...
3
12074
by: sudhaoncyberworld | last post by:
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...
2
7962
by: Greg Strong | last post by:
Hello All, Is it possible to change table field lookup properties in code? I've been able to change other field properties in code, however so far no luck with field lookup properties. What...
2
1398
by: Aaron Gray | last post by:
AFAICT MS IE JavaScript does not support DOM Level 2 Namespaces. Is this correct ? Aaron
4
1711
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
7220
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
7308
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
7371
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
7023
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
5617
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,...
1
5037
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
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
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.