Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 7th, 2004, 02:27 PM
alaa alaa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 alaa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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"> &nbsp;</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">&nbsp;</td>
<td width="20" height="200" bgcolor="black"></td>
</tr>
<td width="300" height="20" colspan="3" bgcolor="brown"> &nbsp;</td>
</tr>
</table>
<br>
<input type="button" value="close" onclick="l()">
</body>
</html>
*/
i am using explorer 6 and winxp

Reply With Quote
  #2  
Old June 7th, 2004, 08:37 PM
Arnica Arnica is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 31 Arnica User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 38 sec
Reputation Power: 5
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > problem with dhtml


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway