I'm trying to take user input from one web page and write it to a different web page that already exists (all in the same domain if that matters). I debug the JavaScript (see below) and see that it iterates through the for loop correctly and builds the correct information to write, but it does not write it to the other web page. Not sure what I'm doing wrong but would greatly appreciate some help!
listitem='';
function newHTML() {
for (i=0;i<3;i++) {
cc=document.forms['mainform'].list[i];
if (cc.checked) listitem+=cc.value;
}
HTMLstring='<HTML>\n';
HTMLstring+='<HEAD>\n';
HTMLstring+='<TITLE>TESTING</TITLE>\n';
HTMLstring+='</HEAD>\n';
HTMLstring+='<BODY bgColor="blue">\n';
HTMLstring+='"'+listitem+'"\n';
HTMLstring+='< /BODY>\n';
HTMLstring+='< /HTML>';
alert(HTMLstring);
newwindow=window.open('writeToThisPage.html');
newwindow.document.write(HTMLstring);
newwindow.document.close();
window.open('writeToThisPage.html');
}