in reply to Re^7: Win32::IE::Mechanize trouble
in thread Win32::IE::Mechanize trouble

So I'm back to trying to get this done after some other things. print $ie->content yields this:

<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD +><BASE href=https://secure.somesite.com:443/ccp/> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> +<LINK href="https://secure.somesite.com/ccp/en/stylesheets/simple.css +" type =text/css rel=stylesheet><LINK media=screen href="https://secure.somes +ite.com/ccp/en/stylesheets/main.css" type=text/css rel=stylesheet><LI +NK med ia=screen href="https://secure.somesite.com/ccp/en/stylesheets/navigat +ion.css" type=text/css rel=stylesheet><LINK media=screen href="https: +//secu re.somesite.com/ccp/en/stylesheets/forms.css" type=text/css rel=styles +heet><LINK media=screen href="https://secure.somesite.com/ccp/en/styl +e sheets/tables.css" type=text/css rel=stylesheet><LINK media=print href +="https://secure.somesite.com/ccp/en/stylesheets/print.css" type=text +/css r el=stylesheet><LINK media=handheld href="https://secure.somesite.com/c +cp/en/stylesheets/handheld.css" type=text/css rel=stylesheet><LINK me +dia=sc reen href="https://secure.somesite.com/ccp/en/stylesheets/styles.css" +type=text/css rel=stylesheet><LINK media=screen href="https://secure. +somesitem obility.com/ccp/en/stylesheets/my.css" type=text/css rel=stylesheet><L +INK media=screen href="https://secure.somesite.com/ccp/en/stylesheets +/ccp.c ss" type=text/css rel=stylesheet> <SCRIPT language=JavaScript> var formChangedMessage='Do you wish to proceed without saving the chan +ges?'; </SCRIPT> <SCRIPT language=JavaScript src="/ccp/jscripts/actionUtil.js"></SCRIPT +> </HEAD></HTML>

No mention of any forms...which is certainly a problem. There is tons of stuff between the last </SCRIPT> and </HEAD>...any idea why it's not showing up? It this a javascript issue?

thanks

Replies are listed 'Best First'.
Re^9: Win32::IE::Mechanize trouble
by ikegami (Patriarch) on Jun 26, 2008 at 15:26 UTC

    Oops, content is not that useful with Win32::IE::Mechanize.

    Win32::IE::Mechanize should see whatever IE sees, and if forms are generated by JavaScript, that shouldn't be a problem if it works in your IE.

      So if I see it when I view source in IE, Win32::IE::Mechanize should see it? I tried a few other sites, and content seems to cut off on the other sites after a javascript tag as well. Although there seems to be no regularity between when it cuts off. Here's the entire HTML code...maybe you'll be able to see something that I don't.

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://ww.w3 +.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <Base href="https://secure.somesite.com:443/ccp/" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/simple.css" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/main.css" media="screen" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/navigation.css" media="screen" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/forms.css" media="screen" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/tables.css" media="screen" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/print.css" media="print" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/handheld.css" media="handheld" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/styles.css" media="screen" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/my.css" media="screen" type="text/css"> <link rel="stylesheet" href="https://secure.somesite.com/ccp/en/styles +heets/ccp.css" media="screen" type="text/css"> <script language="JavaScript"> var formChangedMessage='Do you wish to proceed without saving the chan +ges?'; </script> <script language="JavaScript" src="/ccp/jscripts/actionUtil.js"></scri +pt> <script language="JavaScript" src="/ccp/jscripts/formatUtil.js"></scri +pt> <script language="javascript" src="/ccp/jscripts/displayUtil.js"></scr +ipt> <script language="JavaScript" src="datepicker/datepicker.jsp"></script +> <link href="datepicker/datepicker.css" rel="stylesheet" type="text/css +"> <title>CCP</title> </head> <body onLoad="javascript: initInSubmit();"> <table cellpadding="0" cellspacing="0" border="0" width="800"> <tr><td> <table width="100%" height="100%" border="0" cellspacing="0" cellpaddi +ng="0"> <tr><td> <form name="loginForm" method="post" action="/ccp/login/submitLogin.do +;JSESSIONID_ccp=JqPqLjcFzHKDTtpL2Rp9Z51zwxxnl8PGF4dl3GV0Ly1yvJTCFWyp! +2147126602"> <script language="javascript" type="text/javascript"> function clickedButton(name) { var form = document.loginForm; form.dispatchAction.value = name; performAction(form); } function enterToSubmit() { if (window.event && window.event.keyCode == 13) clickedButton('submitLogin'); else return true; } function goToUrl(toGo) { if (toGo == 'goToRegistration' ) { document.location='/ccp/registration/selfRegistration.do?dispatchA +ction=init'; } else if (toGo == 'mysomesite' ) { var queryString = '?' + window.location.search.substring(1); document.location='https://secure.somesite.com/mysomesite/html +/en/corp/splash_login.jsp' + queryString; } else if (toGo == 'forgetPassword' ) { document.location='/ccp/identity/userNameForQuestionAction.do? +LANGUAGE=en&amp;RETURN_URL=/Home.do'; } } function replaceString(oldS,newS,fullS) { for (var i=0; i<fullS.length; i++) { if (fullS.substring(i,i+oldS.length) == oldS) { fullS = fullS.substring(0,i)+newS+fullS.substring(i+oldS.leng +th,fullS.length) } } return fullS } </script> <input type="hidden" name="dispatchAction" value="" /> <input type="hidden" name="purpose" value=""> <input type="hidden" name="token" value=""> <input type="hidden" name="gotoURL" value=""> <div id="frame"> <!-- COMMENT TO SEE EMBEDDED VALUES somesiteLogo = http://componentcontent.tmi.somesite.com/ccp/en/images/ +language_sensitive_images/logos/mytm_logo.html, loginlogo = http://componentcontent.tmi.somesite.com/ccp/en/images/lan +guage_sensitive_images/pagegraphics/titles/login_title.html, go button = http://componentcontent.tmi.somesite.com/ccp/en/images/lan +guage_sensitive_images/pagegraphics/buttons/go.html --> <img xmlns="http://www.w3.org/1999/xhtml" title="" src="en/images/lan +guage_sensitive_images/logos/image/somesite_corp_pref.gif" class="" a +lt=""/> <br /> <img xmlns="http://www.w3.org/1999/xhtml" title="" src="en/images/lan +guage_sensitive_images/pagegraphics/titles/image/login_title.gif" cla +ss="" alt=""/> <div id="login_container"> <div id="login_login"> <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td> <span class="label">username:</span> </td> <td> <input type="text" name="userName" maxlength="24" size="12" +tabindex="1" value="" onkeypress="return enterToSubmit()" class="text +field0"> </td> <td> <span class="label">new visitor: <a href="javascript:goToUrl +('goToRegistration');">register</a></span> </td> </tr> <tr> <td> <span class="label">password:</span> </td> <td> <input type="password" name="password" maxlength="24" size=" +12" tabindex="2" value="" onkeypress="return enterToSubmit()" class=" +textfield0"> </td> <td> <span class="label"><a href="javascript:goToUrl('forgetPassw +ord');">forgot password?</a></span> </td> </tr> <tr> <td>&nbsp;</td> <td> <span class="button"><a href="javascript:clickedButton('subm +itLogin');"> <img xmlns="http://www.w3.org/1999/xhtml" title="" src="en/images/lan +guage_sensitive_images/pagegraphics/buttons/image/go.gif" class="" al +t=""/> </a></span> </td> <td align="left"> <span class="label"> <a href="/ccp/Login.do?lang=fr">français?</a> </span> </td> </tr> <tr> <td>&nbsp;</td> <td align="center" class="minitext3">&nbsp;<!-- version + --></td> <td>&nbsp;</td> </tr> </table> </div> </div> <table align="center"> <tr> <td class="tabletitle2"> </td> </tr> </table> </div> </form> <script type="text/javascript" language="JavaScript"> <!-- var focusControl = document.forms["loginForm"].elements["userName"]; if (focusControl.type != "hidden") { focusControl.focus(); } // --> </script> </td></tr> <tr><td height="500px" valign="bottom" align="center" class="minitext3 +">V2.7.4</td></tr> </table> </td></tr> </table> </body> </html>

      Thanks for your help