Hi Expert, I have a problem for execute the hyperlink in javascript. When i have alert command in for loop "document.location.href " is execute properly , if i remove the alert command. it will not working. Please adivce on the below script, how to over come this issue.
<HTML><HEAD><script type="text/javascript">function DoTheCheck(form){for (i=0; i<document.forms["DetailBlock"].p_dmmy_box.length; i++){if (document.forms["DetailBlock"].p_dmmy_box[i].checked==true){alert("Checkbox at index "+i+" is checked!")var p1=document.forms["DetailBlock"].p1.value;var ps=document.forms["DetailBlock"].ps.value;document.location.href ="https://dev.xxx.com/x/test.load?p1="+p1+"&ps="+ps}}</script></HEAD><BODY MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0" bgcolor="#ffffff" link="#993300" vlink="#666666" alink="#FFCC00"><FORM ACTION="" METHOD="" name="DetailBlock"><INPUT TYPE="hidden" NAME="p1" VALUE="78642"><INPUT TYPE="hidden" NAME="ps" VALUE="61160224"> <INPUT TYPE="checkbox" NAME="p_dmmy_box" VALUE="123" onClick="click_checkbox(this.checked,0)"></FORM><FORM ACTION="/dbprop/nextpage.sbmt" METHOD="POST" onsubmit="return validate();"><INPUT TYPE="submit" VALUE=" Submit " TITLE="Submit" class="button" onmouseover="this.className='hoverbutton'" onmouseout="this.className='button'" onclick=DoTheCheck(this.form)></FORM></BODY></HTML>
Note: test.load is a stored procedure, which insert data in to temp table. And this should be execute in background only(Could not redirect from current page) ThanksHb venki