flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jude <flexcapaci...@gmail.com>
Subject Re: Not able to pass Object from stagewebview to javascript function
Date Mon, 09 Nov 2015 22:52:45 GMT
Manohar,

Try this stagewebview wrapper,
https://github.com/monkeypunch3/flexcapacitor/blob/master/MainMobileLibrary/src/com/flexcapacitor/controls/WebView.as.
You would pass objects as stringified JSON as Alex mentioned. FYI In the
latest Android a user reported you must add a fake protocol to get the
event to fire, https://github.com/monkeypunch3/flexcapacitor/issues/1.

On Mon, Nov 9, 2015 at 8:38 AM, Alex Harui <aharui@adobe.com> wrote:

> Is your JS function being called, but just not with the right value?
>
> If so, I would just JSON to stringify the object.
>
> -Alex
>
> On 11/9/15, 3:42 AM, "Manohar Jeyaraj" <manume98@gmail.com> wrote:
>
> >ExternalInterface is not available as I am using this in mobile
> >application. Hence I am using stagewebview.
> >
> >I am using stagewebview(to display HTML Google map)  to call a javascript
> >function in flex mobile application.
> >I am passing a selected item value(from flex) to a javascript function
> >like
> >below:
> >
> >webView.loadURL(“javascript:myfunction(‘” + lst.selectedItem[‘name’] +
> >“‘)”);
> >
> >and in my html file  when i add an alert i am getting the value too.
> >
> >But the problem is that the required function is working only when i add
> >it
> >under onload in body as below:
> >
> ><body onload="myfunction('value')">
> >
> >but when i remove the onload method from the body of html and call it from
> >flex the required action is not happening inside the JS function.
> >
> >Kindly help me out on what is causing the issue?
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message