Strange behaviour Netscape 4.5

Discussion in 'HTML' started by Ahmed ALAMI, Jan 12, 2004.

  1. Ahmed ALAMI

    Ahmed ALAMI Guest

    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.
    Ahmed ALAMI, Jan 12, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom
    Replies:
    0
    Views:
    486
  2. Mickey Segal
    Replies:
    1
    Views:
    647
    Mickey Segal
    May 21, 2004
  3. Ahmed ALAMI

    Strange behaviour netscape

    Ahmed ALAMI, Jan 12, 2004, in forum: HTML
    Replies:
    0
    Views:
    401
    Ahmed ALAMI
    Jan 12, 2004
  4. yaktipper
    Replies:
    10
    Views:
    268
    Richard Cornford
    Jul 10, 2003
  5. Ahmed ALAMI

    Strange behaviour netscape 4.5

    Ahmed ALAMI, Jan 12, 2004, in forum: Javascript
    Replies:
    0
    Views:
    93
    Ahmed ALAMI
    Jan 12, 2004
Loading...

Share This Page