WebView: Javascript popup alert box not displayed.

by Kumaravel Kandasami » Fri, 13 Feb 2009 08:41:08 GMT


Sponsored Links
 I have simple html that would popup an alert box. Using WebView to display
the page... the popup does not display.

Any suggestions?

HTML Code:

<html>
<head>
</head>
<body>
<script type="text/javascript">
alert('Hello World!!!');
</script>
</body>
</html>

Activity code:

        super.onCreate(savedInstanceState);
        WebView browser = new WebView(this);
        browser.getSettings().setJavaScriptEnabled(true);
        browser.getSettings().setPluginsEnabled(true);

browser.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        browser.getSettings().setSupportMultipleWindows(true);
        WebChromeClient client = new WebChromeClient();
        browser.setWebChromeClient(client);
        browser.loadUrl("file:///android_asset/popup.htm");
        setContentView(browser);



Kumar    _/|\_
www.saisk.com
ku...@saisk.com
"making a profound difference with knowledge and creativity..."

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Focus MapView

Hi,

Thought this might have been covered already, but i cant seem to find
it anywhere. My app reads GPS positions from a file and overlays them
on the mapView. All very simple stuff, but how to get the map view to
go to and zoom in on a point?

Thanks

Liam
--~--~---------~--~----~------------~-------~--~----~

2. Notice: Build broken is fixed

HI All,

I am also experiencing this error  when I am building android for ARM

=========================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=ldp1
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=Donut
============================================
build/core/main.mk:458: *** No TARGET_CPU_ABI defined by board
config: .  Stop.


I note that the HOST ARCH is displayed as x86 but i am running from a
dual core AMD athlon.

please let me know if there are any solutions .

Regards
S.Rajesh Kumar



















--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to rotate a drawable programmatically?

4. OOT: Kang Onno

5. debugging parcel.cpp file

6. Trouble in Printing Unicode Male Character

7. Secure Credentials settings in Donut