We have javascript code for how to send a variable value from an Iframe back to its parent? If you want fetch the variable value or send variable to parent page.
how to send a variable value from an Iframe back to its parent?
Use following code:
In Parent page use this copy paste folliwing javascript.
function showValue(testval) { alert(testval); //here in parent page you call any other function as per your need. }
In Iframe page use following code. In Iframe page use this copy paste folliwing javascript.
// Calls the function showValue in the parent object // and passes the value of 't' to it function passToParent(val) { var testval; if ( (testval = window.parent) && (testval = testval.showValue) && ('function' == typeof testval || 'object' == typeof testval) ){ testval(val); } }
This will solve your problem.