title: How to manipulate Javascript websites in Perl
body: <p>I have been asked to automate the logging into a webapp(what I assume to be one, that runs a lot of .aspx and .js scripts) that, currently, can only run in IE. Now i am programming in Perl and have tried to use Win32::IE::Mechanize to run the IE browser and log in. What i did was try an extract all the forms from the webapp, and given the users information, fill out the required forms, but this is where the problem arises, when I try and run the subroutine no forms appear...... </p>
  
  <p>So then I transitioned into WWW::Mechanize and used the post subroutine(from LWP::UserAgent) which solved the problem for the most part. Now i've run into a problem in the response, from the server, I get this script as the content of the response and I don't know what to do with it. </p>
  
  <p>So my question is: <strong>Using Perl how can I go about to manipulate a Javascript functions in a website? Would that even be a valid solution to the problem?</strong> </p>
  
  <p>I am open to writing this in other programming languages as well. Thanks in advance for the help!
  (So that I can fully log in to the webapp)</p>
  
  <p><strong>Update</strong>: The content of the response:</p>
  
  <p></p>
  
  <p></p>
  
  <pre><code> var msgTimerID;
  
   var strForceLogOff = "false";
  
   function WindowOnLoad(){
  
      if ("false" == "true" &amp;&amp; "false" == "false") 
          MerlinSystemMsg("",64);
  
      if ("false"=="true") 
          msgTimerID = window.setInterval("MerlinSystemMsg(10095,64)", 300000,'javascript');
  
   }
  
   function MyShowModal(){
  
       showModalDialog("", window, strFeatures);}
  
   function clearMsgInterval(){
  
      window.clearInterval(msgTimerID);
  
   }
  
   function WindowOnUnLoad(){
  
       if(top.frames(0).document.getElementById("OPMODE").value =="LOGOFF"){
  
           strFeatures = "width=1,height=1,left=1000,top=1000,toolbar=no,scrollbars=no,menubar=no,location=no,directories=no,status=yes,resizable=1";
  
           window.open("ForceLogOff.aspx","forcelogout",strFeatures);
  
       }
  
   }
  
   window.onbeforeunload = WindowOnUnLoad;
  
   window.onload = WindowOnLoad;
  </code></pre>
  
  <p></p>
  
  <p> </p>
  
  <p>  </p>
  
  <p></p>
  
  <p>There is also this Frame Title that has the src:  </p>
  
  <blockquote>
    <p>FRAME TITLE="Service Desk Express Navigator" SRC="options_nailogo.aspx" MARGINWIDTH=0 MARGINHEIGHT=0 NORESIZE scrolling=no</p>
  </blockquote>