prabhu p

prabhu p

  • NA
  • 181
  • 115k

how to add data to array and check whethere it exist in arr

Sep 9 2015 10:40 AM
 
in my gridview  i have text box  for emailid in that  i want make validation  for same emailid  does not  submit to db on button click
 
for that   i wrote java script
function OnSubmit() {
debugger;
var Table_Value = new Array();
var j = 1;
var strValue;
var Grdemilid = document.getElementById('ctl00_ContentPlaceHolder1_Grdemilid');
var len = Grdemilid.rows.length;
for (i = 0; i < Grdemilid.rows.length; i++) {
var txtUnitsArray = $("input[id*=txtemailid]");
var txtemailid = new Array(500)
txtemailid= txtUnitsArray[i].value;
}
return false;
}
 in that i will get last email id in loop in array .but i want  all email id  to be added in arrlist can u help me thank you
 
 
 
 

Answers (1)