want to make a single column invisible in that html table

V

Valli

Hi,

I am adding records to htmltable using javascript coding. I want to
make a single column invisible in that html table.
Can anyone help me in this?

My javascript code to add a new row in html table follows below:
var tbody =
document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];

var row = document.createElement('TR');

var td1 = document.createElement('TD');

var td2 = document.createElement('TD');

var td3 = document.createElement('TD');

td1.innerHTML=orderorpositiontype;

td2.innerHTML =buysell;

td3.innerHTML = buyselltype;

row.appendChild(td1);

row.appendChild(td2);

row.appendChild(td3);

tbody.appendChild(row);


My target is to make 2column invisible..What is the javascript coding
require for this?
 
V

Valli

Hi,

Thanks for your answer.

If I set Visibility property, the cell is made invisible but it occupies
its own space in the table(a blank space is displayed in that cell). For me,
the space must also be made invisible. In the design of that table, If i set
visible = 'false, its made invisible. But in Javascrip coding , What should
I write to make that cell invisible completely?

Can you help me in this.

Regards
Valli

Just Me said:
<td style="visibility:hidden;">

Valli said:
Hi,

I am adding records to htmltable using javascript coding. I want to
make a single column invisible in that html table.
Can anyone help me in this?

My javascript code to add a new row in html table follows below:
var tbody =
document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];

var row = document.createElement('TR');

var td1 = document.createElement('TD');

var td2 = document.createElement('TD');

var td3 = document.createElement('TD');

td1.innerHTML=orderorpositiontype;

td2.innerHTML =buysell;

td3.innerHTML = buyselltype;

row.appendChild(td1);

row.appendChild(td2);

row.appendChild(td3);

tbody.appendChild(row);


My target is to make 2column invisible..What is the javascript coding
require for this?
 
J

Just Me

Well, I dont think (AFAIK ) that this is possible. If you really want to
make it invisible, why not just dont display it. You could make the fonts
really tiny and reduce the width of the TD's I suppose. but your not going
to be able to remove all the width occupied by the invisible cells.



Valli said:
Hi,

Thanks for your answer.

If I set Visibility property, the cell is made invisible but it
occupies its own space in the table(a blank space is displayed in that
cell). For me, the space must also be made invisible. In the design of
that table, If i set visible = 'false, its made invisible. But in
Javascrip coding , What should I write to make that cell invisible
completely?

Can you help me in this.

Regards
Valli

Just Me said:
<td style="visibility:hidden;">

Valli said:
Hi,

I am adding records to htmltable using javascript coding. I want to
make a single column invisible in that html table.
Can anyone help me in this?

My javascript code to add a new row in html table follows below:
var tbody =
document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];

var row = document.createElement('TR');

var td1 = document.createElement('TD');

var td2 = document.createElement('TD');

var td3 = document.createElement('TD');

td1.innerHTML=orderorpositiontype;

td2.innerHTML =buysell;

td3.innerHTML = buyselltype;

row.appendChild(td1);

row.appendChild(td2);

row.appendChild(td3);

tbody.appendChild(row);


My target is to make 2column invisible..What is the javascript coding
require for this?
 
V

Valli

HI,

I have set the display property as 'None' for that cell and now its
working as required.

tcell.Style.display = 'none';

Thanks for your help.

--
Regards
Valli

Just Me said:
Well, I dont think (AFAIK ) that this is possible. If you really want to
make it invisible, why not just dont display it. You could make the fonts
really tiny and reduce the width of the TD's I suppose. but your not going
to be able to remove all the width occupied by the invisible cells.



Valli said:
Hi,

Thanks for your answer.

If I set Visibility property, the cell is made invisible but it
occupies its own space in the table(a blank space is displayed in that
cell). For me, the space must also be made invisible. In the design of
that table, If i set visible = 'false, its made invisible. But in
Javascrip coding , What should I write to make that cell invisible
completely?

Can you help me in this.

Regards
Valli

Just Me said:
<td style="visibility:hidden;">

Hi,

I am adding records to htmltable using javascript coding. I want to
make a single column invisible in that html table.
Can anyone help me in this?

My javascript code to add a new row in html table follows below:
var tbody =
document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];

var row = document.createElement('TR');

var td1 = document.createElement('TD');

var td2 = document.createElement('TD');

var td3 = document.createElement('TD');

td1.innerHTML=orderorpositiontype;

td2.innerHTML =buysell;

td3.innerHTML = buyselltype;

row.appendChild(td1);

row.appendChild(td2);

row.appendChild(td3);

tbody.appendChild(row);


My target is to make 2column invisible..What is the javascript coding
require for this?
 
J

Just Me

Well, you learn something new every day.

Well done !


Valli said:
HI,

I have set the display property as 'None' for that cell and now its
working as required.

tcell.Style.display = 'none';

Thanks for your help.

--
Regards
Valli

Just Me said:
Well, I dont think (AFAIK ) that this is possible. If you really want to
make it invisible, why not just dont display it. You could make the fonts
really tiny and reduce the width of the TD's I suppose. but your not
going to be able to remove all the width occupied by the invisible cells.



Valli said:
Hi,

Thanks for your answer.

If I set Visibility property, the cell is made invisible but it
occupies its own space in the table(a blank space is displayed in that
cell). For me, the space must also be made invisible. In the design of
that table, If i set visible = 'false, its made invisible. But in
Javascrip coding , What should I write to make that cell invisible
completely?

Can you help me in this.

Regards
Valli

"Just Me" <news.microsoft.com> wrote in message
<td style="visibility:hidden;">

Hi,

I am adding records to htmltable using javascript coding. I want
to make a single column invisible in that html table.
Can anyone help me in this?

My javascript code to add a new row in html table follows below:
var tbody =
document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];

var row = document.createElement('TR');

var td1 = document.createElement('TD');

var td2 = document.createElement('TD');

var td3 = document.createElement('TD');

td1.innerHTML=orderorpositiontype;

td2.innerHTML =buysell;

td3.innerHTML = buyselltype;

row.appendChild(td1);

row.appendChild(td2);

row.appendChild(td3);

tbody.appendChild(row);


My target is to make 2column invisible..What is the javascript coding
require for this?
 
M

Mark Rae [MVP]

I have set the display property as 'None' for that cell and now its
working as required.

tcell.Style.display = 'none';

Yes, that would correct.

Google for CSS style display visibility for more on this...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top