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


Groups > comp.lang.javascript > #10461

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

From Dr J R Stockton <reply1203@merlyn.demon.co.uk>
Newsgroups comp.lang.javascript
Subject Re: Shrinking the width of a WIDTH=100% table
Date 2012-01-21 20:50 +0000
Organization Home
Message-ID <9SpAtIIGUyGPFwR4@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <8nsih7pjdunj21096qub8tnr1mluk2bons@4ax.com>

Show all headers | View raw


In comp.lang.javascript message <8nsih7pjdunj21096qub8tnr1mluk2bons@4ax.
com>, Fri, 20 Jan 2012 14:04:31, Swifty <steve.j.swift@gmail.com>
posted:

>I have a CGI script that builds a table with "WIDTH=100%"
>
>There are many paths through the code, but they all required the table
>to be WIDTH=100%
>
>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%
>
>I'm open to a CSS solution as well, but there are other tables in the
>same page which must remain WIDTH=100% so it would have to be specific
>to just this one table.
>
>N.B. My environment ensures that all users will have JavaScript
>enabled.


That suggests to me that your CGI is emitting the table piece-by-piece,
which makes it harder to change what has already been sent.

Perhaps you can instead collect the table within the CGI as a string, or
as an array of strings later joined, and send it out from CGI only when
you can no longer want to change it.  You can then alter the width in
the table within the CGI, before sending.

Conceivably, your code could be clearer if the table were contained
within a div, and that of size 100% or not - or otherwise.


-- 
 (c) John Stockton, nr London UK.  ?@merlyn.demon.co.uk  DOS 3.3 6.20 ; WinXP.
   Web  <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
   PAS EXE TXT ZIP via  <http://www.merlyn.demon.co.uk/programs/00index.htm>
   My DOS  <http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.

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