I have the following code that I am using on several pages...
// create array of all quiz pages in the entire quiz
var quiz = new Array()
quiz[0] = new quizPage("pos_home.htm")
quiz[1] = new quizPage("pos_q1.htm")
quiz[2] = new quizPage("pos_q2.htm")
quiz[3] = new quizPage("pos_q3.htm")
quiz[4] = new quizPage("pos_q4.htm")
quiz[5] = new quizPage("pos_q5.htm")
quiz[6] = new quizPage("pos_q6.htm")
quiz[7] = new quizPage("pos_q7.htm")
quiz

= new quizPage("pos_q8.htm")
quiz[9] = new quizPage("pos_q9.htm")
quiz[10] = new quizPage("pos_q10.htm")
quiz[11] = new quizPage("pos_sum.htm")
quiz[12] = new quizPage("../../quiz_menu.htm")
// navigate to next quiz page in sequence
function goNext() {
var currPage, i
for (i=0; i<(quiz.length-1); i++)
{
if (parent.main.location.href.indexOf(quiz[i].src) != -1)
{
if(i + 2 == quiz.length)
{
parent.window.location.href = quiz[quiz.length-1].src;
}
else
{
parent.main.location.href = quiz[i+1].src
break
}
}
}
}
What it does is provide navigation through a quiz. My problem is that this works perfectly everywhere I use it except in one area of my site. The code I posted above is the troublesome code. The only difference between this code and the code that qorks is the htm file names in the array.
The error I receive is
parent.main.location.href is null or not an object
Thoughts?
Clay Hess