YogeshPancholi
Programmer
I have a form page where the input fields and associated label text are in separate columns of a table.
eg. <td>Please enter your name</td>
<td><input type="text" name="txtName"></td> ...etc
When the user clicks submit, my client-side validation JavaScript goes through each input field, and if it finds any errors, it turns the label text red and displays a message at the bottom of the form. This works fine in IE, but I'm having problems in NS. For each label text I have introduced a DIV (to layer it) and a SPAN (for changing the text colour).
eg.
<td>
<div id="idNameDiv" style="position:relative">
<span class="blackFont">Please enter your name</span>
</div>
</td>
<td><input type="text" name="txtName"></td> ...etc
If a user error is encountered, my JavaScript rewrites the idNameDiv layer with the span class="redFont". The problem is when the layer is re-written, it does not get displayed (ie. it looks like that the label text has disappeared). But if I resize my browser window, the label text appears (in red as expected).
Does anyone know why NS is behaving in this way?? Also, can anyone suggest how I can get the text to appear without manually resizing my browser window?
As a workaround I added the following code on a user input error condition:
window.resizeBy(1,1;
window.resizeBy(-1, -1);
However, this doesn't work if the browser window is maximized.
Any help will be greatly appreciated.
Yogesh Pancholi
"If a pig loses its voice, is it disgruntled?"
eg. <td>Please enter your name</td>
<td><input type="text" name="txtName"></td> ...etc
When the user clicks submit, my client-side validation JavaScript goes through each input field, and if it finds any errors, it turns the label text red and displays a message at the bottom of the form. This works fine in IE, but I'm having problems in NS. For each label text I have introduced a DIV (to layer it) and a SPAN (for changing the text colour).
eg.
<td>
<div id="idNameDiv" style="position:relative">
<span class="blackFont">Please enter your name</span>
</div>
</td>
<td><input type="text" name="txtName"></td> ...etc
If a user error is encountered, my JavaScript rewrites the idNameDiv layer with the span class="redFont". The problem is when the layer is re-written, it does not get displayed (ie. it looks like that the label text has disappeared). But if I resize my browser window, the label text appears (in red as expected).
Does anyone know why NS is behaving in this way?? Also, can anyone suggest how I can get the text to appear without manually resizing my browser window?
As a workaround I added the following code on a user input error condition:
window.resizeBy(1,1;
window.resizeBy(-1, -1);
However, this doesn't work if the browser window is maximized.
Any help will be greatly appreciated.
Yogesh Pancholi
"If a pig loses its voice, is it disgruntled?"