Pass variables from javascript (or any) to Corona.

Hi all,
I’ve a serious problem with Corona.
I need to pass the variables stored on map.getCenter().toUrlValue(6) in line 59

to Corona when i move the map.

(here the html page generated from php)
http://www.retroacademy.it/gmap.html

if i use this code, i receive errors on webview.
How can resolve my problem?
 

local function webListener( event )                 if ( event.name ) then                     print( "Name: "..event.name)                 end                 if string.find(event.url, "corona:", 1, false) == 1 then                     print( "Url: "..event.url )                     locationText.text="PROVA: "..event.url                 end             end             webView = native.newWebView( 160, 130, 280 , 200)             webView:request( htmlFile , system.DocumentsDirectory )             webView.hasBackground = false;             webView:addEventListener( "urlRequest", webListener )             native.setActivityIndicator( false ) 

please help me
thanks in advanced,

F.

Hi all,
I’ve a serious problem with Corona.
I need to pass the variables stored on map.getCenter().toUrlValue(6) in line 59

to Corona when i move the map.

(here the html page generated from php)
http://www.retroacademy.it/gmap.html

if i use this code, i receive errors on webview.
How can resolve my problem?
 

local function webListener( event )                 if ( event.name ) then                     print( "Name: "…event.name)                 end                 if string.find(event.url, “corona:”, 1, false) == 1 then                     print( "Url: "…event.url )                     locationText.text="PROVA: "…event.url                 end             end             webView = native.newWebView( 160, 130, 280 , 200)             webView:request( htmlFile , system.DocumentsDirectory )             webView.hasBackground = false;             webView:addEventListener( “urlRequest”, webListener )             native.setActivityIndicator( false ) 

please help me
thanks in advanced,

F.

Ok i’ve tested on iOS and works fine… but not on Android… :frowning:
any idea?

Regardes,
F.

Hi all,
I’ve a serious problem with Corona.
I need to pass the variables stored on map.getCenter().toUrlValue(6) in line 59

to Corona when i move the map.

(here the html page generated from php)
http://www.retroacademy.it/gmap.html

if i use this code, i receive errors on webview.
How can resolve my problem?
 

local function webListener( event )                 if ( event.name ) then                     print( "Name: "…event.name)                 end                 if string.find(event.url, “corona:”, 1, false) == 1 then                     print( "Url: "…event.url )                     locationText.text="PROVA: "…event.url                 end             end             webView = native.newWebView( 160, 130, 280 , 200)             webView:request( htmlFile , system.DocumentsDirectory )             webView.hasBackground = false;             webView:addEventListener( “urlRequest”, webListener )             native.setActivityIndicator( false ) 

please help me
thanks in advanced,

F.

Ok i’ve tested on iOS and works fine… but not on Android… :frowning:
any idea?

Regardes,
F.