Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting focus to a DIV
Message
De
28/09/2012 09:57:00
 
 
À
28/09/2012 09:42:58
Information générale
Forum:
HTML5
Catégorie:
HTML
Divers
Thread ID:
01553827
Message ID:
01553830
Vues:
40
>From here: http://forums.asp.net/t/1302147.aspx/1
>
>SanjaySutar
>Participant
>
>
> Hi,
>   thanx 4 ur replies.
>   I found the solution. Anything which cannot get focus can be forced to get focus by using scrollIntoView() method.
>
>  for e.g document.getElementById('div1').scrollIntoView();
>  Works fine in IE and firefox.
>
That was the first thing I tried. But, it doesn't work.

That div is created with CreateElement. I have a reference to it as loDiv. If I try loDiv.scrollIntoView(), it doesn't work. It doesn't give any error however. But, the focus does not get set. As this is created with CreateElement, I cannot use window.parent.document.getElementById("Div").scrollIntoView() as this gives an error.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform