Android Question Webview, Javascript, "Popup" Close

mw71

Active Member
Licensed User
Longtime User
Hi,

i generate a html Table (with help from a friend) and Show this in a WebView.
The Table contains Links:
HTML:
<td class="tg-x"><a class="a-x" href="javascript:popup('Test')">X</a></td>

the Java Code:
JavaScript:
    <script language="JavaScript">
    function popup(sitedata) {
    w=200;
    h=100;
    x=screen.availWidth/2-w/2;
    y=screen.availHeight/2-h/2;
    var popupWindow=window.open('','','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
    popupWindow.document.write('<html><head></head><body><b>Work:</b></br>'+sitedata+'</br></br><button onclick="javascript:window.history.back()">Close</button></body></html>');
    }
    </script>

The "Popup" open (Webview dont support Popup? it use the full WebView)

Unfortunly the Close Button dont work.
Any Idear?

ps: i use WebViewExtras2
 

mw71

Active Member
Licensed User
Longtime User
Thanks for Anser Erel.
Short, it's no option.

I now that is easier get the data from a Table (i use this too, FlexibleTable? i am not sure), but in this case
- the Routine to catch the Data for the Table take time (depend on Device Resources and SQL Size, 20sec??)
- i dont now if the Table (header) flexible enougth
- i safe the File, so that the User can Send it via eMail, WA.....
- i can zoom the (HTML)Table (other Tables also?)
- i use the same Webview to show Maps (OSM), it can select with a Spinner over the Webview
 
Last edited:
Upvote 0

mw71

Active Member
Licensed User
Longtime User
Hi Erel

i have read in other Threads from WebChromeClient (found via search).
Unfortunately i found no way to use it with WebViewExtras2 (only with WebViewExtras)
I use/need it (WebViewExtras2) for _ReceivedSslError, GetContentHeight and Wvx.GetScale.

Use booth Versions not possible.
 
Upvote 0

mw71

Active Member
Licensed User
Longtime User
Hi,

i have change to WebViewExtras (disable RecivedSslError) and add WebChromeClient,
unfortunately no change, "popup" dont Close.šŸ˜°
 
Upvote 0
Top