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

rshrivaQ,

Please read the PerlMonks FAQ and How do I post a question effectively?. 'HiMonks,' is hardly an appropriate or descriptive title. You need to learn how to format your posts properly (you should have been asked to 'Preview' your post) so we can see all of the code or data you want us to look at.

What error do you get? Perhaps showing us your Perl code would enable us to better advise you. Please note that you are not clicking a button here, this is an image with some JavaScript not a button, keep this in mind when reading the Win32::IE::Mechanize documentation for the $ie->click_button() method.

Update:Thanks fenLisesi, s/Please not/Please note/

Hope this helps

Martin

Replies are listed 'Best First'.
Re^2:How do I click Javascript button with Win32::IE::Mechanize
by rshrivaQ (Initiate) on Dec 19, 2007 at 15:00 UTC
    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.
      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