[Javascript] Table rollover?

Andrew Gibson andyg at ihug.co.nz
Sun Aug 5 16:57:51 CDT 2001


I guess you can use DHTML for this.

Have the table written within a <div id=mydiv></div>

Then, with your onclick event rewrite the contents of the div using
.innerHTML or document.write

It will work, but you may need to do some reading on DHTML.

Andrew Gibson






 > Hello.
 >
 > I was wondering if anyone out there knows if it is possible to use
 > javascript to do something like an image rollover, but for tables. What I
 > need to do is change
 > the contents of a table, including all table cells and their image and
 > text contents, using an OnClick event. So far I have written something
 > that in theory works,
 > except that it doesn't work because it is apparently impossible to undo
 > and rewrite stuff once you have used the document.write method.
 >
 > Can anyone help me out? If this is in fact impossible then I will have to
 > resort to the painfully redundant method of creating about 15
 > rather large
 > documents that are almost exactly identical.
 >
 > Hope to hear from someone.
 >
 > Ali Wol
 >
 > _______________________________________________
 > Javascript mailing list
 > Javascript at LaTech.edu
 > http://www.LaTech.edu/mailman/listinfo/javascript
 >




More information about the Javascript mailing list