Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6792485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:58:31+00:00 2026-05-26T17:58:31+00:00

I am loading a webpage into a webview from the database with the loadDataWithBaseURL()

  • 0

I am loading a webpage into a webview from the database with the loadDataWithBaseURL() function and am trying to subsequently jump to an Anchor point. When I place a button just below the webview that uses the loadUrl()-function, it jumps to the Anchor point just fine. But if I place the loadUrl() after the loadDataWithBaseURL() it says page not found.

webview.loadDataWithBaseURL("app:myhtml", data, "text/html", "UTF-8", null);
webview.loadUrl("app:myhtml#tips");

I assumed it was because the load had not completed, and thus it couldn’t find the Anchor, but I tried a loop to wait for it to getProgress() to equal 100, and have verified it’s reaching 100 before that command executes, but it still won’t find the page unless it’s associated with the button click.

Any Ideas out there on how I can load a page from the database and then jump to an anchor point at the same time. I’m working with the Android 2.1 SDK.


Thanks to your help I got it to load directly to my anchor by adding this little bit of code. However I can’t scroll around on the page, it starts to move and then snaps back. I suspect because it is reloading the page to that anchor each time. I’m fairly new to Android, and Java even, so this may be the wrong implementation of your suggestion, but I’d certainly appreciate a little more direction. Here is the code I used:

webview.setWebViewClient(new WebViewClient() {  
    @Override  
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(webview, "app://data");
        webview.loadUrl("app://data#tips");
    }  
});

It seems this is making an infinite loop.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:58:32+00:00Added an answer on May 26, 2026 at 5:58 pm

    Try using valid URL as a base URL in loadDataWithBaseURL(), such as app://myhtml.

    Also, to make sure the data was loaded implement WebViewCLient.onPageFinished().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i am trying to include a webpage link from another website into my
I'm downloading a webpage, and then loading strings from the page into a WPF
I am loading data from external html files within my domain into a div
I am loading a local webpage in a WebView in my application. Is there
is there anyway of loading a web page from a different domain into a
I'm loading a url into a webview and accessing the onPageFinished method to hide
I'm loading third party webpage that contains following code <script type=text/javascript> onDomReady(function() { some_code1;
I am trying to parse the HTML of a webpage to DOM by loading
Loading images into Flex (size < 100kb) causes IE7 memory increase by a megabyte
When loading a page for the first time (!IsPostback), I am creating a button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.