Click to See Complete Forum and Search --> : window.location problem


jennAshton
04-03-2003, 03:25 PM
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>

jennAshton
04-03-2003, 08:00 PM
Here is my problem.

You get the answer page, however, there's no way of clicking back button. Is there away around this where you can go back to your questions and see what you've selected?

Thanks ahead guys!

Jenn

jennAshton
04-03-2003, 08:03 PM
Thanks it worked. I found out my input type should be button rather than submit. heehee:D

jennAshton
04-03-2003, 09:13 PM
Hmm...that's weird. What browser are you using? I can see the index.html and answer.html okay and no errors. Well, I have it figured out. Sorry, I'm such a newbie at JS my codes are really messy. Thanks Dave for looking.

Jenn