I want to call a function that I have inside a iframe
. I program in Ionic and wanted to know how I do this through JavaScript or HTML.
Within JavaScript I have a variable ( Z = 2.5
, just an example of the same value) of type number
.
I want to get this variable and move to the function that is inside a iframe
.
Within iframe
this function only takes and returns a value.
function pegavalor(){
var url = 2.5;
var ff = url;
return ff;
}
Within iframe
you still have some calculations that will be done with that value.
How do I call this function through JavaScript or HTML?
I already tried to use var index = window.parent; index.testePai (); and it did not work.