Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #10448

Re: Shrinking the width of a WIDTH=100% table

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="ISO-8859-1"
Message-ID <1936358.aqSPkdTlGX@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Organization PointedEars Software (PES)
Date Fri, 20 Jan 2012 22:17:02 +0100
User-Agent KNode/4.4.11
Content-Transfer-Encoding 7Bit
Subject Re: Shrinking the width of a WIDTH=100% table
Newsgroups comp.lang.javascript
References <8nsih7pjdunj21096qub8tnr1mluk2bons@4ax.com>
Followup-To comp.lang.javascript
MIME-Version 1.0
Lines 41
NNTP-Posting-Date 20 Jan 2012 22:17:03 CET
NNTP-Posting-Host fe06f905.newsspool2.arcor-online.net
X-Trace DXC=YNYYO1f91eg]BlmkiiU@BiA9EHlD;3Ycb4Fo<]lROoRa8kF<OcfhCOk`W;:Ca2SK7dDZm8W4\YJNl;?f@h5gMfbl0HL@K4XoXnoQ]BKAfZDgLj
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.javascript:10448

Followups directed to: comp.lang.javascript

Show key headers only | View raw


Swifty wrote:

> I have a CGI script that builds a table with "WIDTH=100%"

First of all, CGI is an obsolete technology [1].  Use server extensions or 
FastCGI [2] instead.

> There are many paths through the code, but they all required the table
> to be WIDTH=100%

Second, do not do that.  Learn and apply CSS instead [3].
 
> Now, I find that in just one of the paths, it would be better if that
> WIDTH=100% had not been specified.
> 
> Is there any JavaScript that I can insert, after the <TABLE> has
> already been started, which  will remove the effect of the WIDTH=100%

Since the `width' attribute has no specified default value [4], the only 
proper way is to program what you would do manually: remove the attribute.

  elem.removeAttribute("width");

However, if you had used CSS, you could have reset the `width' property to 
its specified initial value [3, 5]:

  elem.style.width = "auto";


PointedEars
___________
[1] <http://en.wikipedia.org/wiki/Common_Gateway_Interface#Drawbacks>
[2] <http://www.fastcgi.com/drupal/>
[3] <http://www.w3.org/TR/CSS21/visudet.html#propdef-width>
[4] <http://www.w3.org/TR/html4/struct/tables.html#adef-width-TABLE>
[5] <http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties>
-- 
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-20 14:04 +0000
  Re: Shrinking the width of a WIDTH=100% table Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-20 06:20 -0800
  Re: Shrinking the width of a WIDTH=100% table "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-01-20 17:04 +0200
    Re: Shrinking the width of a WIDTH=100% table Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-01-20 16:35 +0100
      Re: Shrinking the width of a WIDTH=100% table "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-01-20 19:45 +0200
      Re: Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-20 18:49 +0000
    Re: Shrinking the width of a WIDTH=100% table "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-22 13:57 -0800
  Re: Shrinking the width of a WIDTH=100% table Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-20 22:17 +0100
    Re: Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-21 06:28 +0000
      Re: Shrinking the width of a WIDTH=100% table "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-01-21 11:07 +0000
      Re: Shrinking the width of a WIDTH=100% table Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-21 19:52 +0100
        Re: Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-22 06:54 +0000
          Re: Shrinking the width of a WIDTH=100% table Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-22 14:06 +0100
            Re: Shrinking the width of a WIDTH=100% table "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-01-22 15:17 +0200
            Re: Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-23 06:52 +0000
              Re: Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-23 07:10 +0000
              Re: Shrinking the width of a WIDTH=100% table Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-23 16:36 +0100
  Re: Shrinking the width of a WIDTH=100% table Dr J R Stockton <reply1203@merlyn.demon.co.uk> - 2012-01-21 20:50 +0000
    Re: Shrinking the width of a WIDTH=100% table Swifty <steve.j.swift@gmail.com> - 2012-01-22 06:42 +0000

csiph-web