Strange behaviour netscape

A

Ahmed ALAMI

Hello everybody,
I want to execute an onkeypress event over a inout field included in a
table.
Depending on the fact that i specify the width value for the table,
the onkeypress is executed or not.

Here is my code
<html>
<head>
<script>
function controler()
{
var message = "";
//controle format date
message = ctrlFormatDate(document.forms[0].elements["dayDateAdhesion"],document.forms[0].elements["monthDateAdhesion"],document.forms[0].elements["yearDateAdhesion"],true);

if (message == "") {
document.forms[0].submit();
}
else {
alert(message);
}
}
</script>

</head>
<body onload="autoStart();">
<form method="post" name="actions">

<table border="0" cellspacing="0" align="center" id="table1"
width="100%">
<tr>
<th height="22" colspan="2">
Critères
</th>
</tr>

<tr>
<td height="22" class="clair" width="243" >
Date
</td>
<td height="22" class="clair" width="212">:
<input class="inputDates" type="text" name="dayDateAdhesion"
maxlength="2" size="2" value="09"
onkeypress="onkeypress_field(event,&quot;java.lang.String&quot;,this)"
onkeyup="return onkeyup_field(event, 2, this);"
onmouseout="onmouseout_field(event,&quot;java.lang.String&quot;,this)"
onmouseover="onmouseover_field(event,&quot;java.lang.String&quot;,this)"
onblur="onblur_field(event,&quot;java.lang.String&quot;,this)">/
<input class="inputDates" type="text" name="monthDateAdhesion"
maxlength="2" size="2" value="01"
onkeypress="onkeypress_field(event,&quot;java.lang.String&quot;,this)" onkeyup="return onkeyup_field(event,
2, this);" onmouseout="onmouseout_field(event,&quot;java.lang.String&quot;,this)"
onmouseover="onmouseover_field(event,&quot;java.lang.String&quot;,this)" onblur="onblur_field(event,&quot;java.lang.String&quot;,this)">/
<input class="inputDates" type="text" name="yearDateAdhesion"
length="4" size="4" value="2004"
onkeypress="onkeypress_field(event,&quot;java.lang.String&quot;,this)"
onmouseout="onmouseout_field(event,&quot;java.lang.String&quot;,this)" onmouseover="onmouseover_field(event,&quot;java.lang.String&quot;,this)"
onblur="onblur_field(event,&quot;java.lang.String&quot;,this)">
</td>
</tr>
</table>
</center>


</form>
</body>
</html>


If I specifiy a width, the method is not executed and if I don't
specify it, the method is executed.

Does anyone have an answer for that strange behaviour, and a solution
if i want to keep the width value. I tried with a style and javascript
and that doesn't work.




Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top