I created a WebView which loads up some survey webpage. It's all ok so
far but the problem appears when I press the button
<input class="next" type="submit" onclick="submitForm(); return
false;" value="Next page">
on the webpage which should load URL of the next survey page but it
doesn't. It loads up the old one.

When I used a debugger I saw that at first the method
shouldOverrideUrlLoading() gets correct new url that should load but
then it loads the old one which was already loaded when application
started (with loadUrl() method in onCreate()).

I really don't know what could be causing that so hopefully you can
help me with my problem.

Below is my code:

public class SurveyViewer extends Activity{

private WebView surveyWebView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.survey_view);
    surveyWebView = (WebView)findViewById(R.id.surveywebview);
    surveyWebView.getSettings().setJavaScriptEnabled(true);
    surveyWebView.loadUrl("http://test.1ka.si/a/797";);
    surveyWebView.setWebViewClient(new WebViewClient() {

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String
url) {
            view.loadUrl(url);
            return true;
        }
    });

}
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to