Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting element access inside div
Message
De
18/10/2017 17:04:24
 
 
À
Tous
Information générale
Forum:
Javascript
Catégorie:
Codage, syntaxe et commandes
Titre:
Getting element access inside div
Divers
Thread ID:
01655076
Message ID:
01655076
Vues:
44
I have a div which contains some HTML.

I can do this:
loElements=loDiv.getElementsByTagName("form")
This will contain all the forms.

If I do this:
for (lnCounter=0; lnCounter<loElements.length; lnCounter++)
{
   alert(loElements[lnCounter].id)
}
...it shows me Form1.

As I only need to access one form, I thought of changing this to:
loForm=loDiv.getElementById("Form1")
But, this doesn't work. Javascript stops.

Why can't I access it directly with getElementById()?
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform