in reply to Re: How do I click Javascript button with Win32::IE::Mechanize
in thread How do I click Javascript button with Win32::IE::Mechanize

Thanks for clearing my doubts, but if you check the output of that html page you will see there are two buttons one is BACK and second one is SIGN OFF.So is there any other method or module by which i could click on that signoff button.
  • Comment on Re^2:How do I click Javascript button with Win32::IE::Mechanize

Replies are listed 'Best First'.
Re^3: How do I click Javascript button with Win32::IE::Mechanize
by marto (Cardinal) on Dec 19, 2007 at 15:12 UTC
    You seem to be confusing the issue, you have an image ua/images/button-signoff.gif which may look like a 'button' but is not an HTML button. Now that Corion has edited your node so that people can actually see the HTML you are dealing with we can see that this has an anchor tag <A HREF="javascript:subForm('UA_Signin','signOff')">...</a>, so you want to look at using the $ie->follow_link() method to instruct IE to 'click' the link (again, this is not an HTML button) which should run the JavaScript.

    Update: Added the word method to the last sentence

    Hope this helps

    Martin
      now i tried with find_link(%opt)but still on same positoin. I used $ie->find_link("javascript:subForm('UA_Signin','signOff')") I am getting error can't call method "find_link" on an undefined value. Even i tried number and text option also :-( Thanks
        rshrivaQ,

        Have you declared my $ie = Win32::IE::Mechanize->new(); in your code? Post what you have so that we can better help you with this issue. Please remember to format your post properly, as previously discussed.

        Update: Also, did you notice that in my previous reply I suggested looking at the $ie->follow_link() method?

        Thanks

        Martin