document.Form.submit not submitting along with window.location at chrome and some IE 7 and 8
<p>Hii Everyone ,
I am working on a project which is a kind of Survey. Here we navigate to different pages with another question.
Once a question is asked ,user submit his response.After submitting the form , the page is redirected to next question. Below is the javascript code that enables it.</p>

<pre><code>function nextPage (nurl,findate,user_type) {

                if(((findate == null)||(findate=="0000-00-00"))&amp;&amp;((user_type != "survey owner"))&amp;&amp;(user_type !="PI admin")){

                    document.showQuestionAnswerForm.submit();
                    scode= document.getElementById('surveyCode').value;
                    parent.SurveySummaryFrame.location="load_survey.php?scode="+scode + "&amp;template=" + '&lt;? echo $_GET["template"]?&gt;';

                }
                window.location.href=nurl;

            }
</code></pre>

<p>This code works fine with FF and IE6 at most of the time but fails with at times with IE7 and IE8 and every time with google chrome. If I remove <code>window.location.href=nurl;</code> it submits it. but without commenting <code>window.location.href=nurl;</code> it moves to next url without saving the user response.
My guess is due to high speed of processing of some browser it may go directly to next url without leaving the earlier part to submit. (Tough a weired idea I hope)
I need a solution badly to fix it. Can any one help</p>
