Hi guys I am working on an application and it needs to access a third party service through an iFrame. I basically need to know how I can have Javascript autofill the fields and then submit the form that is contained in an iframe. Is this possible?
var iframedoc = document.getElementById('the_iframe').contentWindow.document;
var inputs = iframedoc.getElementsByTagName('input');
// do stuff with inputs...
iframedoc.getElementsByTagName('form')[0].submit(); // submit a form
I’ve never actually done this so I’m not sure if it’ll work - I suspect not because of this: