multicombo js in webview android

Home / Uncategorized / multicombo js in webview android

Question:
i have multiCombo selected value using js in my website, i was test in desktop and android browser (chrome, mozilla, etc) everything ok,

but when i trying make this website to android application using webView, multiCombo doesn’t work

i was to enable Javascript in my webView
webView = (WebView) findViewById(R.id.webView1);
webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);

webView.setWebViewClient(new Client());
webView.setWebChromeClient(new WebChromeClient());

public class Client extends WebViewClient {
ProgressDialog progressDialog;
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return false;
}

public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {

view.loadUrl("file:///android_asset/error_page/index.html");
//Intent i = new Intent(MainActivity.this, Errormessage.class);
//startActivity(i);
Toast.makeText(getApplicationContext(), "No Conection to Server :(",
Toast.LENGTH_LONG).show();

}

public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed(); // Ignore SSL certificate errors
}

public void onPageStarted(WebView view, String url, Bitmap favicon) {
// Then show progress Dialog
// in standard case YourActivity.this
if (progressDialog == null) {
progressDialog = new ProgressDialog(MainActivity.this);
progressDialog.setMessage("Loading…");
progressDialog.show();
}
}

public void onPageFinished(WebView view, String url) {
try {
// Close progressDialog
if (progressDialog.isShowing()) {
progressDialog.dismiss();
progressDialog = null;
}
} catch (Exception exception) {
exception.printStackTrace();
}
}
}

i using jQuery version -2.1.3 , thank you.


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *