Welcome visitor
* Login
* Register
It is currently March 25th, 2019, 3:09 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  dynamic table
PostPosted: April 20th, 2009, 11:08 pm 

Posts: 61
hi guys and gals. can you help me creating a dynamic table? at least pointing me to what i should do.

this table shoul look something like this:

Name Age Team
Score Goal %

but each cell will have an actual value. i would like to give the option to change the goal and the % cell will change automatically. any idea is welcomed. thanks.


Top
 Profile  
 
  Re: dynamic table
PostPosted: April 21st, 2009, 12:06 am 
User avatar

Posts: 86
Hope this helps. I included some inpute fields into the cells and using javascript performed some operations to get the percentage number.
<td><input value="25" readonly id="goal"></td>
<td><input value="50" id="actual" onKeyUp="calculate(value);"></td>
<td><input value="50%" id="percentage"></td>

<script type="text/javascript">
function calculate(i){
var e;
e=document.getElementById('goal').value;
document.getElementById('percentage').value= e*100/i+'%';
}

</script>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron