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

  • SEARCH
  • Home
  • 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 8171271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:24:42+00:00 2026-06-06T21:24:42+00:00

I understand how to call Javascript from my WebView, that isn’t the issue. if(javascriptCall!=null){

  • 0

I understand how to call Javascript from my WebView, that isn’t the issue.

if(javascriptCall!=null){
        String hardCodedexample = "1959602";
        webView.loadUrl("http://myappexample+ username);

        webView.loadUrl("javascript:" + "window.application.relocateTo({location:'patients/details',params:{EMPIID:"+ hardCodedEMPIID +"}})");
    }

javascriptCall is a String which is passed to my webview activity. hardCodedEMPIID is just an example for our testing. My problem is that when I allow the app the run normally on the device my javascript method doesn’t seem to work. It loads the myappexample and I can’t tell what happened with my javascript call.

When I debug the app and single step through the code it properly calls the method. I’m confused on how this is possible? the different between single step and normal execution.

  • 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-06-06T21:24:43+00:00Added an answer on June 6, 2026 at 9:24 pm

    You should wait for onPageFinished(WebView view, String url) event called by WebViewClient (http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageFinished(android.webkit.WebView, java.lang.String) ) . JavaScript file with your function might not be loaded right away after calling loadUrl.

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

Sidebar

Related Questions

Possible Duplicate: Call php function from javascript I understand that php is server side
I am recieving the below CommunicationException from a WCF service call. I understand that
I understand that I can call ToString().IndexOf(...), but I don't want to create an
As I understand it I can use reverse P/Invoke to call C# from C++.
Using a delegate I can call any function asynchronously. From the documentation I understand
I would like to call a webservice from javascript. I tried: var locator =
I am trying to call the __doPostback javascript function in a asp.net page from
If I want to call a server function from JavaScript to retrieve a name
I'm loading an HTML file from the SD card with android's WebView.loadUrl() method. this
I am trying to call my BHO method from the javascript. The problem is

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.