in reply to Re^2: Help getting text from website using www mechanize
in thread Help getting text from website using www mechanize

- it works but, all I'm getting is a return character... so much for that.

$mech->get( $uri )
NOTE: Because :content_file causes the page contents to be stored in a file instead of the response object, some Mech functions that expect it to be there won't work as expected. Use with caution.
  • Comment on Re^3: Help getting text from website using www mechanize

Replies are listed 'Best First'.
Re^4: Help getting text from website using www mechanize
by Kesarion (Initiate) on Jan 28, 2011 at 11:40 UTC

    Wow, you saw right through that code, thank you very much that was it.

    I've got one more question though, it seems mechanize can't see text generated through javascript, is there any way I can get it ?

    For example, here's a bit of code:

    function calculate(){ if(date_completate(0)){ $('#PolitaAddForm').ajaxSubmit(formoptions); }else{ $('#prima').html("Insufficient data."); } } var formoptions = { target: '#prima', url: '/rca/ajax/calcul' };

    Now when you first enter the form page you can see "Insufficient data" in the div with the id "prima". If you complete some of the form that changes into a number. That's what I want to get. There are other ways to get it but this would be the most straightforward one.