Hi,

My requirement is to pass object from stagewebview to javascript function
in HTML page.

Below is the sample code in Flex:

var obj:Object = new Object();
obj.firstName = "Simon";
obj.lastName = "Free";
webView.loadURL("javascript:myfunction('" + obj + "')");

Below is the code of JS function in HTML page:

function myfunction(obj)
{
        var str = obj.lastName;
        alert(str);
 }

The alert is showing up as 'undefined' in the application.
How to get the exact value of object in javascript? But if I write
alert(obj), it will display as [Object Object], which means there is object
value there but i am not able to extract it. Kindly let me know if there is
any way to extract object data in javascript.

Reply via email to