From: Marc G. <mgu...@ya...> - 2005-04-27 10:57:20
|
Which version of htmlunit do you use? I think that this problem is fixed in current CVS. Marc. SALL Ousmane wrote: > <html> > <body> > <script> > function submitForm2() { > leform2.varform2.value="javascriptModified2"; > leform2.submit(); > } > </script> > <form action="http://www.yahoo.fr" name="leform2"> > <input type="text" name="varform2" value="valform2"> > <input type="button" onclick="submitForm2()" > value=submit> > </form> > </body> > </html> > > Excuse with my poor english,I use the htmlUnit jar for > getting javascript redirection after submitting a form > like the one in the top of this message normaly the > URL of the new page would : > http://fr.yahoo.com/?varform2=javascriptModified2 > But on > page.getWebResponse().getUrl().toExternalForm()) the > value is : http://fr.yahoo.com/ > Or I want to get the new URL with the parameter of > the for and new values like a browser do. > Here is the part of Java code I use for getting the > new URL : > List listInput= > page.getDocumentElement().getHtmlElementsByTagName("form"); > > for (Iterator iter = listInput.iterator(); > iter.hasNext();) { > HtmlForm formul = (HtmlForm) iter.next(); > System.out.println("New URL -> > "+formul.submit().getWebResponse().getUrl().toExternalForm()); > } > > Thanks for help. > --- > OSall > > > > > > > __________________________________________________________________ > Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! > Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |