mikembm
01-26-2009, 11:53 PM
I'm working on a site that uses an iframe to load cross domain sites.
The problem is that some sites use javascript to say put focus into an input field.
I have managed to prevent this by using setInterval that continuously gives focus to an input on my page but this causes the problem of not being able to click into the location bar.
So basically, is it possible to to only regain focus when an element inside of the iframe takes focus? Or even just solving the location bar problem with my current solution would also work. (And I have tried things such as applying onfocus events to the iframe element - but they simply don't work because it's not the iframe that's gaining focus, but elements inside of it)
Thanks
The problem is that some sites use javascript to say put focus into an input field.
I have managed to prevent this by using setInterval that continuously gives focus to an input on my page but this causes the problem of not being able to click into the location bar.
So basically, is it possible to to only regain focus when an element inside of the iframe takes focus? Or even just solving the location bar problem with my current solution would also work. (And I have tried things such as applying onfocus events to the iframe element - but they simply don't work because it's not the iframe that's gaining focus, but elements inside of it)
Thanks