Hi guys,
i've a set of js widgets which should be able to run in an androind
environment as well. They work flawless in each webbrowser and also in
Androids webbrowser.
let's go in detail, there is one widget which does jsonp
communication. It is realized with an iframe to be able to detect
faulty calls (based on the famous jquery jsonp plugin)
my problem now is, if i let this javascript run in an androind webview
as soon as an iframe is created and appended to the head of the page,
this iframe becomes visible and stays blank and is blocking the view.
on a webbrowser the iframe simply stays hidden because it's added to
the head.
the base code to create an iframe within javascript would be this:
this.head = document.getElementsByTagName("head")[0];
var frame = document.createElement("IFRAME");
this.head.appendChild(frame);
the ewbview itself is created like this
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = mWebView.getSettings();
webSettings.setSavePassword(false);
webSettings.setSaveFormData(false);
webSettings.setJavaScriptEnabled(true);
webSettings.setSupportZoom(true);
mWebView.loadUrl("file:///android_asset/smart/apps/test/
test.htm");
}
this test.htm simply creates that iframe on a click to fetch data via
jsonp, but again... this iframe becomes visible :-(
good news is, if i click back i see the page and the fetched data, so
the process itself works but the stuipd iframe should not become
visible.
Anyone an idea how i can get this iframe staying hidden?
many thanks in advance
Treeda
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en