I´m using AutoFill
I'm getting all autofill form of pages that need
I want to put in a javascript variable array all urls
when load the page javascript activate submit the form
and then submit the go to the next url
<iframe src="here url" height="100%" width="100%"></iframe>
Initially I have two doubts:
- How to activate submit within the iframe with javascript?
- How do going to the next url array after submit ?
UPDATE
<?php header('Access-Control-Allow-Origin: *'); ?>
<script type="text/javascript" src="jquery-3.1.1.min.js"></script>
<iframe src="http://example.com/contact/" id="InnerIframe" height="100%" width="100%"></iframe>
<script>
$(window).on('load', function() {
$('#InnerIframe').contents().find('submit').trigger( "click" );
});
</script>
Console log:
jquery-3.1.1.min.js:3197 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost" from accessing a cross-origin frame.
at contents (http://localhost/site/jquery-3.1.1.min.js:3197:14)
at Function.map (http://localhost/site/jquery-3.1.1.min.js:457:13)
at jQuery.fn.init.jQuery.fn.(anonymous function) [as contents] (http://localhost/site/jquery-3.1.1.min.js:3201:24)
at http://localhost/site/:8:22
at dispatch (http://localhost/site/jquery-3.1.1.min.js:5201:27)
at elemData.handle (http://localhost/site/jquery-3.1.1.min.js:5009:28)contents @ jquery-3.1.1.min.js:3197map @ jquery-3.1.1.min.js:457jQuery.fn.(anonymous function) @ jquery-3.1.1.min.js:3201(anonymous function) @ (index):8dispatch @ jquery-3.1.1.min.js:5201elemData.handle @ jquery-3.1.1.min.js:5009
util.js:208 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keysPA.j @ util.js:208(anonymous function) @ js?v=3.exp&key&ver=4.6.1:127(anonymous function) @ js?v=3.exp&key&ver=4.6.1:46(anonymous function) @ js?v=3.exp&key&ver=4.6.1:43(anonymous function) @ js?v=3.exp&key&ver=4.6.1:46(anonymous function) @ js?v=3.exp&key&ver=4.6.1:99(anonymous function) @ js?v=3.exp&key&ver=4.6.1:43(anonymous function) @ js?v=3.exp&key&ver=4.6.1:99(anonymous function) @ js?v=3.exp&key&ver=4.6.1:43(anonymous function) @ js?v=3.exp&key&ver=4.6.1:99ic @ js?v=3.exp&key&ver=4.6.1:45hc.Sb @ js?v=3.exp&key&ver=4.6.1:99(anonymous function) @ util.js:1