Autofocusing input in an Iframe

129 Views Asked by At

I am writing a form in an Iframe, when I go into the direct page, the autofocus in the page works, but if I put the page that contains the form in an Iframe, the autofocus stops working, is there a way to focus the input when the iframe loads? Thanks!

I wrote autofocus="autofocus" in the form, and actually works, but not in the iFrame.

<input id='user' type='text' value='' class='ee108 form-control required' style='width:100%'  name='user' placeholder='user' tabindex='60' autofocus="autofocus" onkeyup="this.value = this.value.toLowerCase();"/></td>

And this works without any problem if i open tha page right into the browser, now in i put the page into an it wont autofocus the input as it does in the page.

iframe code:

0

There are 0 best solutions below