Autofocus with a form within an Iframe

Issues related to forms.
Post Reply
MullGen
 
 
Posts: 7
Joined: Thu Mar 12, 2020 10:37 am

Autofocus with a form within an Iframe

Post by MullGen »

I created a form on a page and the autofocus works correctly. Placing the page within an Iframe and the autofocus does not work.
The page is placed within the Iframe by clicking on a menu item if that makes a difference.
All help much appreciated.
Ian
User avatar
Pablo
 
Posts: 21710
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Autofocus with a form within an Iframe

Post by Pablo »

'auto focus' is a standard HTML functionality which is implemented in the browser.
So, you have no control over how it works via HTML.

But this may be helpful:
https://bugzilla.mozilla.org/show_bug.cgi?id=1272328
MullGen
 
 
Posts: 7
Joined: Thu Mar 12, 2020 10:37 am

Re: Autofocus with a form within an Iframe

Post by MullGen »

Thanks Pablo. Worked perfectly up until recently so something must have changed and it was not my code.

Going to have to look for an alternative to Iframe I guess.
MullGen
 
 
Posts: 7
Joined: Thu Mar 12, 2020 10:37 am

Re: Autofocus with a form within an Iframe

Post by MullGen »

Looks like there is no solution and many are searching for a solution.

I cannot be alone in trying to setfocus to an Editbox within a form with an iframe.

Best regards,

Ian
User avatar
Pablo
 
Posts: 21710
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Autofocus with a form within an Iframe

Post by Pablo »

Note that this is unrelated to WWB. This is standard HTML functionality, only the browser has control over how it works.
MullGen
 
 
Posts: 7
Joined: Thu Mar 12, 2020 10:37 am

Re: Autofocus with a form within an Iframe

Post by MullGen »

Thanks Pablo.

I now understand that it is nothing to do with WWB.

It would be just great to find some code /script that overcomes this issue.

Keep up the good work. Stay safe and stay well.

Ian
User avatar
BaconFries
 
 
Posts: 5364
Joined: Thu Aug 16, 2007 7:32 pm

Re: Autofocus with a form within an Iframe

Post by BaconFries »

Take a look at the following urls from Google...read the link's from experts-exchange. Note this is for information only no guarantee any of the codes given will work... trial and error

https://www.google.com/search?safe=acti ... 60&bih=699
Post Reply