iframe set value on input outside js
<body>
<input id="input-field" />
</body>
iframe set value on input outside js
<body>
<input id="input-field" />
</body>
iframe set value on input outside js
<body>
<iframe id="site2-frame" src="http://www.mysite2.com/index.php"></iframe>
</body>
iframe set value on input outside js
var frame = document.getElementById('site2-frame');
frame.contentWindow.postMessage('Something something something', '*');
iframe set value on input outside js
var input = document.getElementById('input-field');
window.addEventListener('message', function(e) {
// Check the origin, accept messages only if they are from YOUR site!
if (/^http\:\/\/www\.mysite1\.com/.test(e.origin)) {
input.value = e.data;
// This will be 'Something something something'
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us