I have googled for strings like "WebView internal link", read the FAQs, and read the online docs for WebView, WebSettings, WebViewClient, WebChromeClent and still I have not been able to determine how to make the web pages I have generated (which contain internal links [i.e., <a name> tags]) jump to an internal link once loaded with WebView.loadDataWithBaseURL().
I have even tried turning on javascript in the WebView using the following code: WebSettings settings = webView.getSettings(); settings.setJavaScriptEnabled(true); Then I added the following javascript to the end of my generated HTML (but before the closing </body></html>): <script language="javascript">location.href="#12";alert('running javascript')</script> I then load the generated HTML into my WebView using code like the following: webView.loadDataWithBaseURL( "content://com.example.app/gen", generatedHtml, "text/html","utf-8",""); The web page never jumps to the internal link and I never see any indication that the alert box was sent. In other words, the javascript may not be running. Anyway, I don't really want to use javascript to jump to the internal link but it is one method I have tried. I'd rather do it without javascript anyway. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---