O
o.o.Pb.o.o
The title is pretty vague, I couldn't agree on how to word my inquiry
correctly, but I can explain. I'm writing a simple wiki script that is
contained in one HTML file (yes, it's been done before). I'm having
trouble with clearing anything displayed in the current document and
writing new text.
The primitive code (method calls and other needless stuff taken out)
I'm using goes as follows:
function showPage()
{
top.document.open();
top.document.write("");
top.document.close();
document.write("New Page");
}
On certain browsers, new text is simply displayed on the screen, all is
well. On Firefox and FF-based browsers, a completely new page is loaded
only containing the text "New Page" as its source. Everything else is
gone, a view source shows that "New Page" is the only contents of the
document. Of course, I need the rest of the code to run this script!
This is probably an exremely dumb question, but I don't know where to
begin looking for a solution. Is there any way that I could only have a
<p> or <div> that text is dynamically taken and added to? How would I
do this?
correctly, but I can explain. I'm writing a simple wiki script that is
contained in one HTML file (yes, it's been done before). I'm having
trouble with clearing anything displayed in the current document and
writing new text.
The primitive code (method calls and other needless stuff taken out)
I'm using goes as follows:
function showPage()
{
top.document.open();
top.document.write("");
top.document.close();
document.write("New Page");
}
On certain browsers, new text is simply displayed on the screen, all is
well. On Firefox and FF-based browsers, a completely new page is loaded
only containing the text "New Page" as its source. Everything else is
gone, a view source shows that "New Page" is the only contents of the
document. Of course, I need the rest of the code to run this script!
This is probably an exremely dumb question, but I don't know where to
begin looking for a solution. Is there any way that I could only have a
<p> or <div> that text is dynamically taken and added to? How would I
do this?