I'm trying to get an id field by concatenating a sting and an input value. The input value changes based on a previous action in the page and I want to be able to use that create an action.
var ID=$("#PeoplePickerIDField").val();
var blocker="$('#block"+ID+"')";
if (blocker.val() == "Allow"){
alert("Allowed");
} else {
alert("Not Allowed");
}
The value of the field "PeoplePickerIDField" is the one that changes and this corresponds to the block field also (this id already changes based on what is in the "PeoplePickerIDField").
any help would be appreciated :)
thanks
blocker=$('#block"+ID), Just create a valid selector using string concatenation the use$()