Tables- Cell Size based on a variable

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
javascript 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 the variable kbps as a
percentage
 
S

Stefan B Rusynko

You'll need ASP or JavaScript to write (document write) the whole nested table




| 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
| javascript 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 the variable kbps as a
| percentage
|
|
 
M

Mike Mueller

: Mike,
:
: This is very simple once you have the table structured
: correctly. I've posted an example at
: http://www.websunlimited.com/samples/table_size_change.htm

I appreciate the example. I see and for the most part
understand how it works. What I need to know is how to use
a js variable in there.

Mike

:
: :: 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 javascript 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 the variable kbps as a
:: percentage
 
M

MD WebsUnlimited.com

Say the js variable is:

var iSize = "30";

Then the function call is:
changeSizeTable(document.getElementById('Table5'),iSize + '%');
 
M

Mike Mueller

Thank you. That works for me and now I will try and
integrate that with what I have.

Mike


: Say the js variable is:
:
: var iSize = "30";
:
: Then the function call is:
: changeSizeTable(document.getElementById('Table5'),iSize +
: '%');
:
: ::: Mike,
:::
::: This is very simple once you have the table structured
::: correctly. I've posted an example at
:::
http://www.websunlimited.com/samples/table_size_change.htm
::
:: I appreciate the example. I see and for the most part
:: understand how it works. What I need to know is how to
:: use a js variable in there.
::
:: Mike
::
:::
::: :::: 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 javascript 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 the variable kbps as a
:::: percentage
 

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

Top