window.location problem

admin

Administrator
Staff member
I am working on a simple quiz for my site. Instead of having the answer.html poping up another window to display the results. I would like to have the result page which is answer.html displayed on the same page. Do I just replace var win = window.open(url, 'Product'); to window.location=url;? Please help!
<script>
function wizard()
{

url = '';

if (document.finder.radio0[0].checked) {
url = url + '1';
} else {
url = url + '2';
}

if (document.finder.radio1[0].checked) {
url = url + '1';
} else {
url = url + '2';
}

if (document.finder.radio2[0].checked) {
url = url + '1';
} else if (document.finder.radio2[1].checked) {
url = url + '2';
} else {
url = url + '3';
}

if (document.finder.radio3[0].checked) {
url = url + '1';
} else {
url = url + '2';

}

url = 'answer.html?' + url + '00';

var win = window.open(url, 'Product');
win.focus();
return true;
}

</script>
 
Back
Top