From: SALL O. <osa...@ya...> - 2005-04-27 12:32:50
|
I'am using the version 1.5 of htmlUnit --- Marc Guillemot <mgu...@ya...> wrote: > 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 > > > > > > ------------------------------------------------------- > 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 > ------ SALL Ousmane Etudiant en Master 2 ISIDIS Université du Littoral Côte d'Opale Calais-FRANCE Tel: 0675447569/0321828801 __________________________________________________________________ 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/ |
From: SALL O. <osa...@ya...> - 2005-04-27 13:33:53
|
Thanks, i have download the current version in CVS but the value of the input is not the good normally it's : http://fr.yahoo.com/?varform2=javascriptModified2 But the after a submit the page.getWebResponse().getUrl().toExternalForm()) give me : http://www.yahoo.fr?varform2=valform2 valform2 is the initial value --- Marc Guillemot <mgu...@ya...> wrote: > 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 > > > > > > ------------------------------------------------------- > 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 > ------ SALL Ousmane Etudiant en Master 2 ISIDIS Université du Littoral Côte d'Opale Calais-FRANCE Tel: 0675447569/0321828801 __________________________________________________________________ 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/ |
From: Marc G. <mgu...@ya...> - 2005-04-27 13:58:49
|
Can you open a bug with your example for this problem. Marc. SALL Ousmane wrote: > Thanks, i have download the current version in CVS but > the value of the input is not the good normally > it's : > http://fr.yahoo.com/?varform2=javascriptModified2 > But the after a submit the > page.getWebResponse().getUrl().toExternalForm()) give > me : > http://www.yahoo.fr?varform2=valform2 > valform2 is the initial value > > --- Marc Guillemot <mgu...@ya...> wrote: > >>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 > >> >> >> > ------------------------------------------------------- > >>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 > > > ------ > SALL Ousmane > Etudiant en Master 2 ISIDIS > Université du Littoral Côte d'Opale Calais-FRANCE > Tel: 0675447569/0321828801 > > > > > > > __________________________________________________________________ > 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 > |