problem in changing the actual event handler into our own event

Discussion in 'Javascript' started by ashok.dhananjeyan@gmail.com, Oct 30, 2006.

  1. Guest

    Hi


    I have a problem in changing the actual event handler into our own
    event.

    i.e

    var f = document.forms("formname")
    if(!f) continue;
    _subH = f.submit
    alert("Submit handler" + _subH) ;

    f.submit = SampleSubmit


    function SampleSubmit()
    {
    ..
    ..
    ..
    ..


    ..

    f.submit = _subH
    f.submit();

    }


    Actually in this code i am trying to assign the actual submit handler
    into variable _subH. but at very first time the handler cannot be
    captured into that variable _subH(error says "access denied:
    -2147024891). once the HTML page is refreshed ,the handler can be
    retrieved.

    This error is occurred only when we are using other than the submit
    button like "button,anchor tag", to submit the page.

    Thanks in advance.
     
    , Oct 30, 2006
    #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. Jake Barnes
    Replies:
    1
    Views:
    436
    Andy Dingley
    Nov 14, 2005
  2. Pradeep

    Implementing our own providers

    Pradeep, Jun 7, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,823
    john_teague
    Jun 7, 2006
  3. Kamilche

    Our OWN 'Deep C Secrets'

    Kamilche, May 8, 2004, in forum: C Programming
    Replies:
    21
    Views:
    748
    goose
    May 14, 2004
  4. bala
    Replies:
    0
    Views:
    259
  5. Replies:
    1
    Views:
    733
    Damien
    Feb 22, 2007
Loading...

Share This Page