aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Change TD width in Netscape 4 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Change TD width in Netscape 4" Watch "Change TD width in Netscape 4" New topic
Author

Change TD width in Netscape 4

Jon Christensen
Greenhorn

Joined: Apr 14, 2003
Posts: 21
We are changing the width of a column by calling the following:

This obviously doesn't work in Netscape 4 but works fine in Netscape 7.. Is there a way to change the width of a <td> using Javascript in Netscape 4+?
[ April 14, 2003: Message edited by: Jon Christensen ]
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50674

No. Once NN4 renders a page, there is no way to dynamically change the width of just about anything.
Question: why are you bothering to support something as antiquated as NN4?
bear


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
Yeah NN 4 is a pain about DHTML type of features, One thing you can do to get around it is have the table created inside a layer tag and have it dynamically rewriteen, but that is a bit of blown out of the water for an older browser.
Eric
Jon Christensen
Greenhorn

Joined: Apr 14, 2003
Posts: 21
I like that idea. Here is what I came up with but I can't get it to work:

And here is the HTML code:

When I call updateprogress(XX), I don't get any errors but I don't see the width of the columns changing. Am I missing something?
[ April 15, 2003: Message edited by: Jon Christensen ]
NOTE:
I change this layout so it would not make the other replys messed up.
Eric
[ April 15, 2003: Message edited by: Eric Pascarello ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
I just whipped this up, I am sure you can figure it out without an explaination. Code is similiar to the code I used for layers, but it uses innnerHTML instead.
http://www10.brinkster.com/a1ien51/JavaRanch/innerhtmltext.htm
Eric
Jon Christensen
Greenhorn

Joined: Apr 14, 2003
Posts: 21
Thanks alot for the javascript. When I take the function out of a form and call it, it no longer works. Below is what I want it to do. The ChangeText function runs, but the text does not get rewritten.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
hey, now you wondered onto another NS4 problem. The page has to be loaded entirely before you can call the function
you can do it by adding the onload event to the body tag with the text change.
also just some info if you have <Script> you should use </Script> not </script>
It can mess up NS4 (LOL)
Eric
 
 
subject: Change TD width in Netscape 4
 
Threads others viewed
how to position div over table
Javascript and Struts Indexed Text Boxes
URGENT Help needed on JavaScript.
resizing table width
Resizing table width upon page load
IntelliJ Java IDE