Javascript is not working in Chrome and IE but working in Firefox -
here javacript code working in mozilla not working in ie , chrome.
function updatetable(tableid) { alert('inside update'); var arraytemp=new array(); var str=''; var arraycount=0; try { var table = document.getelementbyid(tableid); var rowcount = table.rows.length; for(var i=0; i<rowcount; i++) { var row = table.rows[i]; var chkbox = row.cells[4].childnodes[0]; if(null != chkbox && true == chkbox.checked) { str+= document.getelementbyid("flag"+i).value; str+=','; str+= document.getelementbyid("selected"+i).value; str+='`'; } } document.forms[0].updatearray.value=str; alert(' value '+document.forms[0].updatearray.value); document.forms[0].submit(); alert('checkingdddddd'); }catch(e) { alert(e); } } here forms not getting submitted in ie , chrome.please tell there remedy this.
i have tested , found document.forms("formname").submit() working chrome , ie if use document.forms["formname"].submit not working in chrome , ie quite strange, advice great javascript magician needed
i have found out remedy use document.forms[0].submit supports in mozilla , ie , google chrome.
the answer is:
replace: document.forms[0].submit(); to: document.forms[0].submit;
Comments
Post a Comment