![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
function doWidth() { var Wdiv = document.getElementById("width"); Wdiv.style.width = forWidth+'%'; //set a NEW width if (forWidth++ > 99) //reSet forWidth if required forWidth = 0; setTimeout("doWidth();",10); //recursive (I think anyway) } What is "forWidth"? The variable magically appears from nowhere and is |
|
div id=width class="b"> </div div id=height class="a"> </div can someone point out my mistake here? Where do the JS functions get called? Nothing here shows that. |
#3
| |||
| |||
|
|
News wrote: function doWidth() { var Wdiv = document.getElementById("width"); Wdiv.style.width = forWidth+'%'; //set a NEW width if (forWidth++ > 99) //reSet forWidth if required forWidth = 0; setTimeout("doWidth();",10); //recursive (I think anyway) } What is "forWidth"? The variable magically appears from nowhere and is uninitialized. Same applies to "forHeight" in doHeight().) div id=width class="b"> </div div id=height class="a"> </div can someone point out my mistake here? Where do the JS functions get called? Nothing here shows that. An URL showing a test case would be a lot more useful. -- jmm (hyphen) list (at) sohnen-moe (dot) com (Remove .AXSPAMGN for email) |
#4
| |||
| |||
|
|
News wrote: CSS/* set the width and height of each DIV the JavaScript will change them later*/ div.a { width: 1%; height: 5%; } And what, may I ask, do you expect to happen for those folks who don't have JavaScript enabled? They make do with a teensy text box? ish -- Reply email address is a bottomless spam bucket. Please reply to the group so everyone can share. |
![]() |
| Thread Tools | |
| Display Modes | |
| |