Table- control cell size from a variable (js)

  • Thread starter Thread starter Mike Mueller
  • Start date Start date
M

Mike Mueller

FP2000

I am trying to create a webpage for checking connection and
download speeds. That portion is working just fine.

What I want to do next is to display this inside of nested
tables. I am trying to base the cell size percentage on the
variable which contains the speed.

Here is what I have:
<tr>
<td width="100%">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="13%"
bgcolor="#FF0000"><b>You</b></td>
<td width="87%"></td>
</tr>
</table>
</div>
</td>
</tr>

I want to replace the 13% with a variable (SpeedRelative)
 
Mike,

Sounds like you are creating a progress bar-type output. Why not use a
graphic and just increase the width of it based on that value?

From what I can find via Google, it sounds like the table width properties
can't be adjusted. But that was in no way an exhaustive search. ;)
 
I plaud your efforts to provide such a service.

However:
<imho>
Something to keep in mind is that
your speed test will only be as good as
your hosting companies servers and their
position in the "domain structure"
A server in a top level domain is going to
produce consistently faster and more accurate
results.
So, ( and I'm not trying to dampen your enthusiasm )
might not your visitors be better served with a link
to
CNET http://webservices.cnet.com/bandwidth/
( where you can copy and paste a script to
run a test from your website )
or a SpeedGuide www.speedguide.net
speed test ( where they can download and run a tool named
TCPOptimizer to tweak their computer )

How the graph is made is by using a javascript
with several variables and functions which
"paint" a graph using repeating 1 pixel wide images.
I looked at the scripts, and I consider myself
dangerously adept at javascript and to be honest
my impression was: It's too hard considering
the already available tools.
If your building a technically oriented website,
your visitors will be more apt to come back if
you point them to an existing and accurate
test than if you provide your own that may be
limited by factors beyond your control

</imho>
 
Thank you. I am well aware of how the whole picture works,
and I am not providing or promoting it as a true measure.
My site is hosted on a second tier provider connected via
DS3. I am providing it as a service to my host/employer for
a few reasons, such as checking connection speed on their
new wireless broadband system amongst other reasons. I will
check on that CNET site you mentioned and see what they
have.

Mike


: I plaud your efforts to provide such a service.
:
: However:
: <imho>
: Something to keep in mind is that
: your speed test will only be as good as
: your hosting companies servers and their
: position in the "domain structure"
: A server in a top level domain is going to
: produce consistently faster and more accurate
: results.
: So, ( and I'm not trying to dampen your enthusiasm )
: might not your visitors be better served with a link
: to
: CNET http://webservices.cnet.com/bandwidth/
: ( where you can copy and paste a script to
: run a test from your website )
: or a SpeedGuide www.speedguide.net
: speed test ( where they can download and run a tool named
: TCPOptimizer to tweak their computer )
:
: How the graph is made is by using a javascript
: with several variables and functions which
: "paint" a graph using repeating 1 pixel wide images.
: I looked at the scripts, and I consider myself
: dangerously adept at javascript and to be honest
: my impression was: It's too hard considering
: the already available tools.
: If your building a technically oriented website,
: your visitors will be more apt to come back if
: you point them to an existing and accurate
: test than if you provide your own that may be
: limited by factors beyond your control
:
: </imho>
:
:
: :: FP2000
::
:: I am trying to create a webpage for checking connection
:: and download speeds. That portion is working just fine.
::
:: What I want to do next is to display this inside of
:: nested tables. I am trying to base the cell size
:: percentage on the variable which contains the speed.
::
:: Here is what I have:
:: <tr>
:: <td width="100%">
:: <div align="center">
:: <table border="0" cellpadding="0"
:: cellspacing="0" width="100%">
:: <tr>
:: <td width="13%"
:: bgcolor="#FF0000"><b>You</b></td>
:: <td width="87%"></td>
:: </tr>
:: </table>
:: </div>
:: </td>
:: </tr>
::
:: I want to replace the 13% with a variable (SpeedRelative)
 
Back
Top