skhoo
01.06.2001, 10:04
Hi, I hope someone could help me with array of links.
I have 2 frames, topFrame and mainFrame. The pages are navigated with a button in the topFrame called goNext(). It includes :
var quiz = new Array()
quiz[0] = new quizPage("te_sc1.htm")
quiz[1] = new quizPage("te_sc2.htm")
quiz[2] = new quizPage("te_sc3.htm")
function goNext() {
var currPage, i
for (i=0; i<(quiz.length-1); i++) {
if (parent.mainFrame.location.href.indexOf(quiz[i:aoonskzvxm].src) != -1) {
parent.mainFrame.location.href = quiz[i+1].src
break
}
}
}
It works fine. But my question is, how do I create another function goNext() and place it in each page in the mainFrame? I know I could hard code it to go to the next page, but is there a way i could communicate with the script in the topFrame from the mainFrame? Thanks.
Soon
I have 2 frames, topFrame and mainFrame. The pages are navigated with a button in the topFrame called goNext(). It includes :
var quiz = new Array()
quiz[0] = new quizPage("te_sc1.htm")
quiz[1] = new quizPage("te_sc2.htm")
quiz[2] = new quizPage("te_sc3.htm")
function goNext() {
var currPage, i
for (i=0; i<(quiz.length-1); i++) {
if (parent.mainFrame.location.href.indexOf(quiz[i:aoonskzvxm].src) != -1) {
parent.mainFrame.location.href = quiz[i+1].src
break
}
}
}
It works fine. But my question is, how do I create another function goNext() and place it in each page in the mainFrame? I know I could hard code it to go to the next page, but is there a way i could communicate with the script in the topFrame from the mainFrame? Thanks.
Soon