J
joe
I have a Javascript page which needs to be dynamically changed depending on user
input. The whole page is written on document.write() output.
I am still new to Javascript and run into problems with page reload. When user
presses a button on my page most functions should clear the page and repaint it
using my wholepage() function. After a couple of repaint the page goes into some
error. Am I supposed to clear the div's in the page or wot?
The pseudo code is here:
<html> <head>
....
<SCRIPT LANGUAGE="JavaScript">
....
[lots of code & functions including wholepage()]
....
function wholepage() {
document.write("<body bgcolor=\"#CCCCCC\">");
document.write("<div id=\"Layer1\" style=\"position:absolute;");
....[lots of code]
document.write("</div> </body>");
return true;}
....
function updateit() {
wholepage();
return true;}
</SCRIPT>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
wholepage()
</SCRIPT>
</html>
input. The whole page is written on document.write() output.
I am still new to Javascript and run into problems with page reload. When user
presses a button on my page most functions should clear the page and repaint it
using my wholepage() function. After a couple of repaint the page goes into some
error. Am I supposed to clear the div's in the page or wot?
The pseudo code is here:
<html> <head>
....
<SCRIPT LANGUAGE="JavaScript">
....
[lots of code & functions including wholepage()]
....
function wholepage() {
document.write("<body bgcolor=\"#CCCCCC\">");
document.write("<div id=\"Layer1\" style=\"position:absolute;");
....[lots of code]
document.write("</div> </body>");
return true;}
....
function updateit() {
wholepage();
return true;}
</SCRIPT>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
wholepage()
</SCRIPT>
</html>