Thanks for encouraging me.I am copying the different code with java script function
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252 +"> <META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD> <BODY><PRE>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitiona +l//EN"&gt; &lt;HTML&gt; &lt;HEAD&gt; &lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset +=iso-8859-1"&gt; &lt;TITLE&gt;Consulting Plus - Single Sign-On&lt;/TITLE&gt; &lt;link rel="stylesheet" href="../style/MenuBar.css"&gt; &lt;script language="JavaScript" type="text/script"&gt; function doSubmit() { document.ctlogonform.method="post"; document.ctlogonform.action="cp_logon_ct.html"; document.ctlogonform.submit(); } &lt;/script&gt; &lt;/HEAD&gt; &lt;BODY bgcolor="#999999" class="linkColor" vlink="FFFFFF"&gt; &lt;table width="1004" border="0" cellspacing="0" cellpadding= +"0"&gt; &lt;tr&gt; &lt;td bgcolor="#FFFFFF" width="4"&gt;&amp;nbsp;&lt;/td&gt +; &lt;td rowspan="2" bgcolor="#FFFFFF" width="222"&gt;&lt;im +g src="../images/qwest_blu_wht1.gif" alt=""&gt;&lt;/td&gt; &lt;td width="381" bgcolor="#FFFFFF"&gt;&amp;nbsp;&lt;/td& +gt; &lt;td colspan="2" bgcolor="#FFFFFF"&gt; &lt;div align="right"&gt; &lt;/div&gt; &lt;/td&gt; &lt;td width="4" class="qwestBlueBGColor" height="16"&gt;& +amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td bgcolor="#FFFFFF" width="4"&gt;&amp;nbsp;&lt;/td&gt +; &lt;td colspan="3" bgcolor="#FFFFFF" height="77"&gt; &lt;font color="006699" size="2"&gt;&lt;b&gt;Consulting Pl +us - Single Sign-On&lt;/b&gt;&lt;/font&gt; &lt;/td&gt; &lt;td width="4" class="qwestBlueBGColor"&gt;&amp;nbsp;&lt +;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="4" class="qwestBlueBGColor"&gt;&amp;nbsp;&lt +;/td&gt; &lt;td width="222" class="qwestBlueBGColor"&gt;&amp;nbsp;& +lt;/td&gt; &lt;td width="381" class="qwestBlueBGColor"&gt;&amp;nbsp;& +lt;/td&gt; &lt;td width="222" class="qwestBlueBGColor"&gt;&amp;nbsp;& +lt;/td&gt; &lt;td width="184" class="qwestBlueBGColor"&gt;&amp;nbsp;& +lt;/td&gt; &lt;td width="4" class="qwestBlueBGColor"&gt;&amp;nbsp;&lt +;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="4" class="formBodyBGColor" height="21"&gt;&a +mp;nbsp;&lt;/td&gt; &lt;td width="222" class="pagename" height="21"&gt;SIGN O +N&lt;/td&gt; &lt;td colspan="3" class="message" height="21" &gt;&amp;n +bsp;&amp;nbsp;To access Consulting Plus, Please enter your CUID and P +assword then click the SIGN ON button.&lt;/td&gt; &lt;td width="4" class="qwestBlueBGColor" height="21"&gt;& +amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="4" class="formBodyBGColor"&gt;&amp;nbsp;&lt;/td& +gt; &lt;td colspan="4" class="formBodyBGColor"&gt; &lt;FORM name="ctlogonform" ACTION="cp_logon_ct.html" METHOD=P +OST ACCEPT-CHARSET="UTF-8"&gt; &lt;INPUT TYPE="hidden" NAME="auth_mode" VALUE="basic"&gt; &lt;table border=0 cellpadding=10 cellspacing=0 width="100 +%"&gt; &lt;tr&gt; &lt;td valign=top&gt; &lt;table border=0 cellpadding=0 cellspacing=0 wid +th="100%"&gt; &lt;tr&gt; &lt;td width="50%"&gt;&lt;img src="../imag +es/spacer.gif" alt="" width=1 height=1 border=0&gt;&lt;/td&gt; &lt;td width="50%"&gt;&lt;img src="../imag +es/spacer.gif" alt="" width=1 height=1 border=0&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign=top&gt;&lt;FONT COLOR="#FF00 +00" FACE="Arial" SIZE="2"&gt;&lt;/FONT&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt;&lt;img src="../i +mages/spacer.gif" alt="" width=1 height=10 border=0&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign=top&gt; &lt;font face="Arial" size=2&gt;&lt;b&gt;C +UID:&lt;/b&gt;&lt;/font&gt; &lt;br&gt; &lt;input type="text" name="user" value="" + maxlength="26" size="22" &gt; &lt;/td&gt; &lt;td valign=top&gt; &lt;font face="Arial" size=2&gt;&lt +;b&gt;Password:&lt;/b&gt;&lt;/font&gt; &lt;br&gt; &lt;INPUT TYPE="password" NAME="p +assword" VALUE="" SIZE="22" MAXLENGTH="20"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/FORM&gt; &lt;/td&gt; &lt;td width="4" class="qwestBlueBGColor"&gt;&amp;nbsp;&lt;/td +&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="6" class="qwestBlueBGColor" height="16"&gt +; &lt;table border="0" cellpadding="0" width="100%" bgcolor= +"#000000"&gt; &lt;tr&gt; &lt;td valign=TOP width="2%"&gt;&lt;/td&gt; &lt;td valign=TOP width="32%"&gt;&amp;nbsp;&lt;/td +&gt; &lt;td align=CENTER valign=TOP width="32%"&gt; &lt;div align="CENTER" &gt;&lt;a class="navBar +Bottom2" href="javascript:document.forms[0].reset();" &gt;RESET&lt;/a +&gt;&lt;/div&gt; &lt;td&gt; &lt;td align=RIGHT valign=TOP width="32%"&gt; &lt;div align="RIGHT"&gt;&lt;a href="javascrip +t:document.forms[0].submit();" class="navBarBottom2"&gt;SIGN ON&lt;/a +&gt;&lt;/div&gt; &lt;/td&gt; &lt;td valign=TOP width="2%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="6" class="qwestBlueBGColor"&gt; &lt;div align="right"&gt;&lt;img src="../images/qwest_ +cygent_basea.gif" alt="" width="1000" height="3"&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="4" bgcolor="ffffff" height="24"&gt;&amp;nbsp +;&lt;/td&gt; &lt;td colspan="3" bgcolor="ffffff" height="24"&gt; &lt;/td&gt; &lt;td colspan="2" bgcolor="ffffff" height="24"&gt; &lt;div align="right"&gt;&lt;img src="../images/qwest_ +RSA_gray.gif" alt="" width="187" height="39"&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="6" bgcolor="#3E6679"&gt; &lt;div align="right"&gt;&lt;img src="../images/qwest_ +cygent_baseb_gray.gif" alt="" width="1000" height="3"&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/BODY&gt; &lt;/HTML&gt; </PRE></BODY></HTML>
and my script is
#!/usr/bin/perl #use strict; #use warnings; use Win32::IE::Mechanize; my $ie = Win32::IE::Mechanize->new( visible => 1); my $url ='http://test.html'; #dummy url $ie->get( $url ); $ie->set_visible($username,$password ); # $ie->follow_link("javascript:document.forms[0].submit();"); $ie->find_link(url => "javascript:document.forms[0].submit();")|| die + "can't call $!";
script is able to load the page and passing the inputs but its not hitting the SIGN ON button. Thanks

In reply to Re^11: How do I click Javascript button with Win32::IE::Mechanize by rshrivaQ
in thread How do I click Javascript button with Win32::IE::Mechanize by rshrivaQ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.