Hi,

I'm new to android, but I think I know what your problem might be.   
shouldOverrideUrlLoading is a method of WebViewClient, not WebView.  

Look into WebViewClient. 

Also, I have my own problem with WebViewClient.  My client will load new 
pages in my webview, but it will not update the current Url that the page 
is on.  It's strange stuff. 

David

On Wednesday, 22 February 2012 05:55:02 UTC-5, petter386 wrote:
>
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to