Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE 5.0 - fatal error - submitting inlog form

    Hi,

    When using a wrong character (defined and checked) in one of the 2 input-fields from my inlog-form, 70% of the time IE 5.0 shows a fatal error message.

    Submitting by button or <enter> gives the same result.

    I check like:

    fm14()=

    var vm141;
    vm141=/^[a-zA-Z0-9]{6,}$/;
    if((!vm141.test(document.formsignin.m1.value))||(!vm141.test(document.formsignin.m2.value)))
    {
    //something
    return false;
    }
    else
    {
    //something else
    }

    form looks like:

    <form name="formsignin" onSubmit="fm14(); return false">
    <input type="text" maxlength="20" name="m1" class="signin" tabindex="5"></input>
    <input type="password" maxlength="20" name="m2" class="signin" tabindex="6"></input>
    <input type="submit" class="signin" value="GO" tabindex="7"></input></form>

    Thanks for Your time!
    Jerome

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I might be "oldfashioned" or I have not learn enough, but something looks peculiar for me in your syntax...

    As far as I know, if it is JavaScript, your function fm14() called onsubmit should have been defined something like

    function fm14() {
    ...
    }

    Now, if your variable vm141... hm, if you want that to be a string, than write it as a string, not as an argument or as a digit/number:

    "/^[a-zA-Z0-9]{6,}$/", with quotes...

    On the other hand, some charcters like ;/ }$ ".... are used by javascript as operators or reserved language marks, so if you insert them without quote them, might have errors...

    As far as I know.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Kor,

    You are right about the function declaration, I left it out the thread, but it's there.

    Concerning the string You mentioned, it's a variabel regular expression to test the input characters, it's very easy to use them, see also the Javascript Kit Tutorial

    Thanks for Your reply,
    Jerome


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •