In article <n8blb.1288$F_4 .12451872@news-text.cableinet. net>, a@abc.com
enlightened us with...[color=blue]
> how would I do it then? - what am I missing?
>[/color]
You're missing the rest of the code and an explanation of what doesn't
work, what you want, and target browsers, if any.
Context = tell us what the heck you want.
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
I want the user to be able to click on a checkbox which will using
javascript show/hide the border of a table
thanks
harry
"kaeli" <infinite.possi bilities@NOSPAM att.net> wrote in message
news:MPG.19feff dd705b8d3b9898f 4@nntp.lucent.c om...[color=blue]
> In article <n8blb.1288$F_4 .12451872@news-text.cableinet. net>, a@abc.com
> enlightened us with...[color=green]
> > how would I do it then? - what am I missing?
> >[/color]
>
> You're missing the rest of the code and an explanation of what doesn't
> work, what you want, and target browsers, if any.
>
> Context = tell us what the heck you want.
>
> -------------------------------------------------
> ~kaeli~
> Jesus saves, Allah protects, and Cthulhu
> thinks you'd make a nice sandwich.
> http://www.ipwebdesign.net/wildAtHeart
> http://www.ipwebdesign.net/kaelisSpace
> -------------------------------------------------[/color]
In article <2dclb.1362$JO5 .13079712@news-text.cableinet. net>, a@abc.com
enlightened us with...[color=blue]
> sorry, target browsers are ie 5.5 & netscape 7
>
> I want the user to be able to click on a checkbox which will using
> javascript show/hide the border of a table
>
> thanks
>[/color]
If the table is named tabMain (<table id="tabMain">)
if (document.getEl ementById && document.getEle mentById("tabMa in").style)
{
document.getEle mentById("tabMa in").style.bord er = "1";
}
else alert("You need a better browser.");
You don't need "top" unless you're using frames, in which case you need
the frame name as defined in the frameset.
if (top.frames["frameName"].document.getEl ementById && top.frames
["frameName"].document.getEl ementById("tabM ain").style)
{
top.frames["frameName"].document.getEl ementById
("tabMain").sty le.border = "1";
}
else alert("You need a better browser.");
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
kaeli <infinite.possi bilities@NOSPAM att.net> writes:
[color=blue]
> If the table is named tabMain (<table id="tabMain">)
>
> if (document.getEl ementById && document.getEle mentById("tabMa in").style)
> {
> document.getEle mentById("tabMa in").style.bord er = "1";[/color]
That is unlikely to work, since "1" is not a valid CSS value for the
border property.
[color=blue]
> You don't need "top" unless you're using frames, in which case you need
> the frame name as defined in the frameset.[/color]
The original poster wrote this "top.document.f rmMain.tabMain. border". I
assume "frmMain" is a frame name. I.e., something like:
var frm = top.frames['frmMain'];
if (frm && frm.document.ge tElementById) {
var elem = frm.document.ge tElementById("t abMain");
if (elem && elem.style) {
elem.style.bord er = "1px solid black";
}
}
/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
In article <3cdmcsdj.fsf@h otpop.com>, lrn@hotpop.com enlightened us
with...[color=blue]
> kaeli <infinite.possi bilities@NOSPAM att.net> writes:
>[color=green]
> > If the table is named tabMain (<table id="tabMain">)
> >
> > if (document.getEl ementById && document.getEle mentById("tabMa in").style)
> > {
> > document.getEle mentById("tabMa in").style.bord er = "1";[/color]
>
> That is unlikely to work, since "1" is not a valid CSS value for the
> border property.[/color]
How WOULD you set the border to 1? I stick to DIVs mostly, which would
be like...
document.getEle mentById("tabMa in").style.bord er="thin solid black";
I don't think that would set the borders for the cells, though, just the
table. It would look different than having border be "1" in the table
def...
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
kaeli <infinite.possi bilities@NOSPAM att.net> writes:
[color=blue]
> How WOULD you set the border to 1? I stick to DIVs mostly, which would
> be like...
> document.getEle mentById("tabMa in").style.bord er="thin solid black";[/color]
If you want to simulate the border attribute, the most likely way is:
document.getEle mentById("tabMa in").border=1 ;
If that doesn't work, you can try:
document.getEle mentById("tabMa in").setAttribu te("border","1" );
[color=blue]
> I don't think that would set the borders for the cells, though, just the
> table. It would look different than having border be "1" in the table
> def...[/color]
Yes. I never used the border attribute, so I would go for a CSS solution:
/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
In article <u162b7ru.fsf@h otpop.com>, lrn@hotpop.com enlightened us
with...[color=blue]
> kaeli <infinite.possi bilities@NOSPAM att.net> writes:
>
>
> Yes. I never used the border attribute, so I would go for a CSS solution:
>[/color]
Thanks!
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
Comment