In a frameset, the first frame is calling a function in the second, but this is a document.write. Can’t find info on this, but apparently the document.write function only works once? What I’d like to do is, depending on the onclick used, write the new content in the second frame (yeah, I could just change the href, but now I’m curious about this). Test code as follows:
this is in frame one:
<TR>
<TH ID=”question_1″ ONCLICK=”(parent.hints.writehint_1() )”>
Do you want hint #1
</TH>
</TR>
<TR>
<TH ID=”question_1″ ONCLICK=”(parent.hints.writehint_2() )”>
Do you want hint #2
</TH> ……….etc……………
and these are the functions in frame two:
<SCRIPT>
function writehint_1()
{
document.write(“<html><head></head><Body><TABLE WIDTH=100% BORDER=0><TR><TD>This is function call 1 from another frame.</TD></TR></TABLE></body></html>”);
document.close();
};
function writehint_2()
{
document.write(“<html><head></head><Body><TABLE WIDTH=100% BORDER=0><TR><TD>This is function call 2 from another frame.</TD></TR></TABLE></body></html>”);
document.close();
};
</SCRIPT>
..etc……end of code
Thanks for any info.