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
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Removing default onfocus for Password field on pageload

    Hi Guys,

    I am facing one problem with onfocus event, I have only Password field in the form and onfocus event for that field,in onfous method we are showing the alert message.My problem while the page on modalwindow onfocus event is firing,thats why alert message is showing.Expected is we have remove this onfocus event while loading the page.I am using IE as my browser.

    Thanks,

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    This belongs in Javascript…moving.

  • #3
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    Code:
     
    <script type="text/javascript">
    window.onload = function(){
    document.getElementById("your_password_fields_id").onfocus = function(){};
    }
    </script>
    -Mike
    "Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender


  •  

    Posting Permissions

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