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.
1 | function showValue(testval) |
In Iframe page use following code. In Iframe page use this copy paste folliwing javascript.
3 | function passToParent(val) |
6 | if ( (testval = window.parent) && (testval = testval.showValue) && ( 'function' == typeof testval || 'object' == typeof testval) ){ |
This will solve your problem.