HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS 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 ASP Free Forums Sponsor:
  #1  
Old July 29th, 2004, 07:07 AM
mennisujay mennisujay is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 mennisujay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Set <td> width using dhtml which runs in Netscape

hi ,
how can i set width for a <td> which should work in netscape, which i am generating dynamically

using Javascript. This is the code i have used, the width i set is working in IE, but it is not

working in Netscape. Hope u guys will give me a solution.

<script language="javascript">
id="displaytable";
var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];

var rowempty = document.createElement("TR");
rowempty.setAttribute("id","tr"+counter);

var row1= document.createElement("TR");
row1.setAttribute("id","tr"+counter);

var tdf1 = document.createElement("TD");
td1.setAttribute("width","42%");
td1.innerHTML="First Name"

row1.appendChild(td1);

tbody.appendChild(row1);
</script>
Thank u
Sujay

Reply With Quote
  #2  
Old July 29th, 2004, 09:11 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I don't know too much about Netscape, but the only way around this I can think of is to set the <td> width in CSS.

Here's an example

<html>
<head>
<style type="text/css">
td.cell {
width: 100px;
}
</style>
</head>
<body>
<table border=1>
<tr><td class=cell>test</td></tr>
</table>
</body></html>


Thanks

Steve

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Set <td> width using dhtml which runs in Netscape


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 5 hosted by Hostway