I am actually writing a custom JSP TAG to generate the code so I ended up doing something like:
a = 5;
b = 6;
window.onload=startpoll();
Then, in startpoll(), I pick up these global variables. Not elegant, but I couldn't find any other way. By the time I'm processing the tag, I'm in the body.
Why does'nt this work?
<BODY>
<SCRIPT language="JavaScript">
window.onLoad=alert("onLoad() called.");
window.onUnload=alert("onUnload() called.");
alert("In Body");
</SCRIPT>
</BODY>
I would have expected the "In...
I tried something that's funky but it partially worked:
I created an absolute <DIV> within a relative <DIV>
.tc {position:relative; layer-background-color:green;}
.tcAbs {position:absolute; layer-background-color:yellow;}
...
<td>
<DIV class="tc" ID="total2">...
Many thanks for everybody's active participation. Yes, absolute positioning works, but if I have a table where multiple elements in a column need to be updated, it makes it difficult to position them just right. On the other hand, if I use text fields, they'll work too, but then the user may...
bangers: Yes, the only reason for the DIV tag is to be able to change the value. Is there any other way to change the value of a table cell? Please (please!) let me know if there is an alternative. Also, even if I use a class on the <td> itself, there is no way for me to access the contents...
The example code that I submited earlier is for Netscape ONLY. That simplified example does the following:
1. Let's the user type in a value in the text field.
2. When the button is clicked, it attempts to change the table cell's value to that in the text field (by modifying the contents of...
Unfortunately, merging the class and the id values didn't work either. It has something to do with using the DIV tag within Tables. I can change the DIV contents outside the table, but not within it. Here's a simple example that can be used to reproduce the problem (NS 4.0 specific):
<HTML>...
I'm sorry I left out the details... Here is a simple code that can re-produce the problem (it is NS specific).
<HTML>
<HEAD>
<TITLE>DIV & Tables...</TITLE>
<STYLE TYPE="text/css">
.tc {position:relative; layer-background-color:yellow;}
</STYLE>
<SCRIPT...
I have a "refresh" problem when I use the <DIV> tag in Tables using NS 4.0.Any help would be greatly appreciated.
I put a DIV element in the table as follows:
<td><DIV class=someClass ID="total"></DIV></td>
Then, I attempt to change the value of the table cell as...
I have a similar problem with Tables and DIV.
I put a DIV element in the table as follows:
<td><DIV class=someClass ID="total"></DIV></td>
Then, I attempt to change the value of the table cell in Netscape as:
document.layers["total"].document.write(result);
The table...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.