Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically referencing a select HTML control
Message
De
10/07/2012 02:27:37
 
 
À
09/07/2012 13:53:25
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01547909
Message ID:
01547978
Vues:
65
This message has been marked as the solution to the initial question of the thread.
>I have a javascript function. In it, I am receiving an ID. This is between 1 and 50. The function has to be generic and capable of establishing a reference to one of the 50 select HTML controls which exists on the form. One of the goal is to be able to disable or enable the control based on the ID received as a parameter. Anyone has done that before?

From your description of the problem (and assuming the parameter passed in is the Id of the control) all you would need would be:
function changeControl(theId){
document.getElementById(theId).disabled = true;
//etc.
}
so I assume I have not understood the question correctly ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform