Hi all, I am creating a newWebview which loads a local html file.
This all works fine.
I am having trouble closing the webview with a button from within the html file.
here is my code:
local function webListener( event ) local theurl = event.url if theurl == "corona:close" then -- remove the webView as with any other display object webView:removeSelf() webView = nil end end local webView = native.newWebView( 0, 0, thewidth, theheight ) webView:request( therequesturl,system.ResourceDirectory ) webView:addEventListener('urlRequest',webListener)
and in my html file i have:
\<form action="corona:close"\>\<input type="submit" value="" id="closebtn"/\>\</form\>
this used to work with webpopups. Anyone have an idea what I might be missing with this?
thanks in advance!