|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
problem with dhtml
i am trying to create a page with a table in which a cell,its height will decrease by 1px every 100 part of second , this the code it is not working i dont know why? can u help?
/* <html> <title>closing</title> <head> <script language="javascript"> var ani; var x=parseInt(document.all.cell1.style.height); function l() { ani=window.setInterval("close()",1); } function close() { if ((x<=200)&&(x!=0)) { x-=1; } } </script> </head> <body bgcolor="black"> <table name="table1" id="table1" width="300" height="300" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="300" height="20" colspan="3" bgcolor="brown"> </td> </tr> <tr name="row1" id="row1" > <td width="20" height="200" bgcolor="black"></td> <td name="cell1" id="cell1" style="width:200px;height:200px;" bgcolor="white"> </td> <td width="20" height="200" bgcolor="black"></td> </tr> <td width="300" height="20" colspan="3" bgcolor="brown"> </td> </tr> </table> <br> <input type="button" value="close" onclick="l()"> </body> </html> */ i am using explorer 6 and winxp |
|
#2
|
|||
|
|||
|
There are some errors in the function but the main problem is that the table cell will not change in height because the adjacent spacer cells maintain the row at 200px height.
You would need to insert an additional one-cell table, bottom-aligned inside the original cell. You should be able to tweak your function then. Mick |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > problem with dhtml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|