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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Location
    Hamburg
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question dynamic change of an event handler does not work

    Hi,

    this is my first post here!

    I am trying for IE6 from a iframe to change the attribute onClick from a button at an onload event with
    either

    parent.document.getElementById("pbsave").setAttribute("onClick", "function () {alert('test');actionSubmit('save2')}")
    or
    parent.document.getElementById("pbsave").onClick = function () {alert('test');actionSubmit('save2')};

    but it keeps on with the old value "save1" for onClick!

    How can i do it ?

    Thanks,

    Hans Braumüller
    Networking Artist
    http://braumueller.crosses.net
    Last edited by hbnetworker; 06-24-2004 at 11:46 AM. Reason: false syntax

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    onclick


  •  

    Posting Permissions

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