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
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts

    OnFocus not working in IE7

    I have an order form which includes

    <tr>
    <td align="right"><font face="Arial" size="3"><em><b>Card
    Number </b></em></td>
    <td><input type="text" size="30" name="CardNumber" onFocus="doCCStuff(this)"></font><font face="Arial" size="2"> </font></td>
    </tr>

    The function doCCStuff calls up a prompt box for the user to enter his credit card number, which is then validated (Luhn test). If OK the card number is then written back into the textbox.

    This has worked without problems for many years in all browsers (as far as I know). But recently two customers have reported that the prompt box does not appear when they tab to that field. They are entering their card numbers directly into the textbox which means that the numbers are not being validated (if not valid are rejected by the Perl script but that is not convenient). It seem that they are both using IE 7 - yet other users with IE7 have experienced no problems.

    Any clues as to why the script doCCStuff() is not being triggered by onFocus? I should say that the users do not have JavaScript disabled as other parts of the form using JS work perfectly, nor are they geeks who can disable particular functions or whatever.

    Is this an IE7 bug - I am told that early or beta releases had a number of "issues". And the final version has only just been released.

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    i had experienced similar problems when i was running earlier versions of IE7. they no longer happen with the latest release.
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    brandonH - thank you very much for that! So no need to panic!


  •  

    Posting Permissions

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