You're not submitting the form, your just loading the page with the
form.

On Oct 2, 2:16 pm, ArtJin <[EMAIL PROTECTED]> wrote:
> Hi there,
> My Android application has to use web and I am having a problem with
> submitting forms.
> I am using WebView for displaying web pages.
> So here is the description of the problem.
> I created a web page called messages.php.
> This page has a web form, and the "method" attribute of the form is
> set to
> "POST":
> <form id="showdetails" action="http://my.devserver.com/
> showDetails.php" method="POST">
> <input type="hidden" name="id" value="123">
> <input type="hidden" name="another_id"  value="456">
> <input type="submit" name="Submit">
> </form>
>
> When I click on "Submit" button and check my log file on the server I
> see that web server receives GET request instead of POST.
> Removing the "action" attribute fixes the problem, but I really need
> to be able submitting forms to different pages, not just itself.
>
> Android code is as follows:
>        public void onCreate(Bundle icicle) {
>                super.onCreate(icicle);
>                setContentView(R.layout.view_replies);
>                webView = (WebView) findViewById(R.id.web_view);
>                webView.getSettings().setJavaScriptEnabled(true);
>                webView.loadUrl("http://my.devserver.com/android/
> messages.php");
>                webView.requestFocus();
>        }
>
> }
>
> Am I forgetting something in Java code? Server side code works just
> fine if I use any conventional browser like Safari or Firefox.
> I will appreciate any help on this.
> Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to