Forum Moderators: open

Message Too Old, No Replies

Problems with Javascrip and Netscape 7

         

Hube

9:53 pm on Mar 30, 2005 (gmt 0)

10+ Year Member



I am working on some Javascript, I'm just a beginner. What I'm trying to do is to update an Iframe and I've set up this little test page for myself. It works fine in IE and in Firefox, but it does not work in Netscape. It starts to work but the browser keeps running and nothing happens.

Anyone have any suggestion?

JS In the Head section of Page:

function WriteHeader(){
problem.document.write('<html><head><link href="math.css" rel="stylesheet" type="text/css"></head><body>');
}

function WriteContent() {
problem.document.write("this is content");
}

function WriteFooter(){
problem.document.write("</body></html>");
}

function ClearFrame() {
problem.document.open();
problem.document.clear();
}

function CloseFrame() {
problem.document.close();
}

----

the Iframe:

<iframe src="defaultframe.html" id="problem" name="problem" frameborder="1" marginwidth="10" marginheight="10" scrolling="no" align="top" height="200" width="500"></iframe>

---

JS in body

ClearFrame();
WriteHeader();
WriteContent();
WriteFooter();
CloseFrame();

---

Hube

10:00 pm on Mar 31, 2005 (gmt 0)

10+ Year Member



I've discovered that if I put an alert before the first time through that Netscape will run it once, but once I close the Iframe I am back to the same situation. IE will run through the thing as many times as I want.

I take it that no one has any idea how to help me with this problem.

What I want to do is open write to the Iframe, wait for user input and then depending on that input, write something new to the iframe.

Any suggestions at all?