I am using an iframe layered over my flex application. In my iframe i have a text input with the id of ‘days’ which is read only.
How can i read the value of days in my flex app?
I thought i may need to do something like this?
var d = ExternalInterface.call("top.frames[0].document.getElementById('days').value");
but it didn’t work.
It doesn’t work, because
top.frames[0].document.getElementById('days').valueis not a function, it’s a property. You need to pass function toExternalInterface.call(more precisely the name of a function). For example, you can define in JavaScript (main window)and then use
in ActionScript.