programmatically click button problem

Discussion in 'ASP .Net' started by greg, Sep 15, 2005.

  1. greg

    greg Guest

    Hi

    I need to programmatically click imagebutton from javascript

    so I write in a link navigate url

    document.forms[0].nextBtn.fireEvent('onclick');

    !!!!! it says nextBtn undefined
    it is a web page not control
    and when I do view source it is nextBtn !!!!

    other input controls I see just fine like checkboxes etc


    Help!!!
     
    greg, Sep 15, 2005
    #1
    1. Advertising

  2. Greg,

    Try:

    document.getElementById('nextBtn').click();

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "greg" <> wrote in message
    news:%...
    > Hi
    >
    > I need to programmatically click imagebutton from javascript
    >
    > so I write in a link navigate url
    >
    > document.forms[0].nextBtn.fireEvent('onclick');
    >
    > !!!!! it says nextBtn undefined
    > it is a web page not control
    > and when I do view source it is nextBtn !!!!
    >
    > other input controls I see just fine like checkboxes etc
    >
    >
    > Help!!!
    >
    >
     
    S. Justin Gengo, Sep 15, 2005
    #2
    1. Advertising

  3. greg

    greg Guest

    Justin

    you are the man
    thanks
    was getting nuts on this stuff

    "S. Justin Gengo" <sjgengo@[no_spam_please]aboutfortunate.com> wrote in
    message news:%23bhQ%...
    > Greg,
    >
    > Try:
    >
    > document.getElementById('nextBtn').click();
    >
    > --
    > Sincerely,
    >
    > S. Justin Gengo, MCP
    > Web Developer / Programmer
    >
    > www.aboutfortunate.com
    >
    > "Out of chaos comes order."
    > Nietzsche
    > "greg" <> wrote in message
    > news:%...
    > > Hi
    > >
    > > I need to programmatically click imagebutton from javascript
    > >
    > > so I write in a link navigate url
    > >
    > > document.forms[0].nextBtn.fireEvent('onclick');
    > >
    > > !!!!! it says nextBtn undefined
    > > it is a web page not control
    > > and when I do view source it is nextBtn !!!!
    > >
    > > other input controls I see just fine like checkboxes etc
    > >
    > >
    > > Help!!!
    > >
    > >

    >
    >
     
    greg, Sep 15, 2005
    #3
  4. if only you'd asked that question earlier....! :(

    "greg" wrote:

    > Justin
    >
    > you are the man
    > thanks
    > was getting nuts on this stuff
    >
    > "S. Justin Gengo" <sjgengo@[no_spam_please]aboutfortunate.com> wrote in
    > message news:%23bhQ%...
    > > Greg,
    > >
    > > Try:
    > >
    > > document.getElementById('nextBtn').click();
    > >
    > > --
    > > Sincerely,
    > >
    > > S. Justin Gengo, MCP
    > > Web Developer / Programmer
    > >
    > > www.aboutfortunate.com
    > >
    > > "Out of chaos comes order."
    > > Nietzsche
    > > "greg" <> wrote in message
    > > news:%...
    > > > Hi
    > > >
    > > > I need to programmatically click imagebutton from javascript
    > > >
    > > > so I write in a link navigate url
    > > >
    > > > document.forms[0].nextBtn.fireEvent('onclick');
    > > >
    > > > !!!!! it says nextBtn undefined
    > > > it is a web page not control
    > > > and when I do view source it is nextBtn !!!!
    > > >
    > > > other input controls I see just fine like checkboxes etc
    > > >
    > > >
    > > > Help!!!
    > > >
    > > >

    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?ZGhucml2ZXJzaWRl?=, Sep 16, 2005
    #4
    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. Purvi T
    Replies:
    0
    Views:
    935
    Purvi T
    Oct 19, 2004
  2. Cathryn  Johns
    Replies:
    6
    Views:
    74,327
  3. Amy
    Replies:
    0
    Views:
    1,041
  4. Bob
    Replies:
    4
    Views:
    542
    Mark Rae
    Dec 28, 2006
  5. Bob
    Replies:
    3
    Views:
    251
Loading...

Share This Page