Debt Consolidation - Debt Consolidation - Debt Consolidation - Web Advertising - Discount Perfume

PDA

View Full Version : Bigginer needs help :D


Lipgut
Apr 25th 2009, 12:50 pm
I am kinda learning the basics of javascript right now but I am deffinly don't know it well enough to do what I want to do..

so my code is something like this ;

<table width="100">
<td>eh?</td>
</table>


Simple , I want to be able to control the width of my table using an input box. So I would type in "1000" and the width of my table would become 1000. I don't know if this is possible and I need a little help. So if someone could tell me how to do it , direct me in the right path or even give me a tut on how to do it , it would be most appriecated!

thank you for reading.

Cylestyne
Apr 25th 2009, 1:06 pm
CSS and DHTML is what you're actually looking for, try looking up some DHTML and CSS tutorials on google, it should be fairly easy.

Lipgut
Apr 25th 2009, 2:03 pm
CSS and DHTML is what you're actually looking for, try looking up some DHTML and CSS tutorials on google, it should be fairly easy.

Thanks , I'll see if I can do it this way. I just thought it would be more a java thing then anything else , but then again I am a begginer :D

dimitar christoff
Apr 26th 2009, 6:17 am
you are correct, you'd use javascript to access css properties of the table, namely the style.width - so you need to assign it an id and access as document.getElementById("blah").style.width = etc.