I have a web-service In that I have added bar-code reader for android
So with the Help of JavaScript I am calling my bar-code reader from web-view
So for that I
Add this script in Web-service at your Parent Menu which has your iframe or iframes
iframe
iframes
If you are using same in more than one frame then declare your frame name globally
I tried your Code Working Fine... In my example Frame Hope It works fine for you
Nice question....