jeudi 18 février 2021

Sending the value I selected with checkbox into ajax

When I use option select, I use the code;

var selNameGroup = document.getElementById("selectedNameGroup ");
selectedNameGroup = selNameGroup .options[selNameGroup .selectedIndex].text;
var docNameGroupIdId = selNameGroup .value;

and I pass into dynamic data.

if (selNameGroup != "" || selNameGroup !== "Choose Name Group") {
//NameGroupId is The request value returned from the model.
dynamicData["NameGroupId"] = docNameGroupIdId ;
  }

Likewise, how do I do for the checkbox?




Aucun commentaire:

Enregistrer un commentaire