Sorry, cant get on. This is my actual code:
#!/usr/bin/perl -w use WWW::Mechanize; use Win32::Process; use LWP; use strict; my $url="http://thewebside"; my $page; my $inhalt; my $firefoxpfad="C:\\firefox\\firefox.exe"; my $firefox="firefox"; ##### page holen ############################# $page = WWW::Mechanize->new( autocheck => 1 ); #$page = WWW::Mechanize->new(); $page->get($url); $page->success or die "Can't get the searched page"; #$page->form_name( "contactForm1" ); $page->form_number( 1 ); $page->field('contactFormId' => "1"); ### hidden field, is already s +et $page->field('name' => "myname"); $page->field('message' => "Hello"); ##### page speichern ######################## $inhalt = $page->content; ## normally I would like to open firefox with $inhalt which should ## contain already the filled fields ## but here I save it to disk #print $inhalt; open (ERGEBNISFILE, ">ergebnisfile.html") || die "Kann \"ergebnisfile\ +" nicht oeffnen $!"; printf ERGEBNISFILE "%s\n" ,"$inhalt"; close (ERGEBNISFILE); =BEGIN ##### open in browser ##################### Win32::Process::Create( my $ProcessObj, ### win xp "$firefoxpfad", "$firefox $url", 0, NORMAL_PRIORITY_CLASS, ".") || die ErrorRepor +t(); =END =cut
Problem:
1. $inhalt does not contain, the filled fields e.g. message with Hello . There is only 1 form on the side. Why are the fields not filled ?
2. Like to open firefox with the filled form. 3. I looked at HTML::Display module, but the simple example
display("<html><body><h1>Hello world!</h1></body></html>");
opens only with IE, I'd like to use firefox instead. If I try to open the real webside it starts loading with IE but then breaks.

In reply to Re: modifyed http page in browser by hudo
in thread modifyed http page in browser by hudo

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.