I've taken out the table formatting to save space, since it's irrelevant... here's what I have, very simple form setup (or so I thought it would be
). I have the form-check function and reset here, the form, with a preview button, which opens a preview, much like the forums do. I even put the poem editor in an iframe like the forums. Maybe that has something to do with it? Who knows... like I said, if I don't preview first, the form submits perfectly. If I preview first, after closing the preview window, the submit button actually does the exact same thing as the preview button, and opens the preview window/code.
<SCRIPT Language=Javascript>
function ResetForm(){
if (window.confirm('<% = strResetFormConfirm %>')){
frames.poem.focus();
frames.poem.document.body.innerHTML = '';
return true;
}
return false;
}
function CheckForm()
{ var returnValue = false;
if (document.frmAddPoem.title.value == "")
{ alert('A Poem isn`t a poem with a title...','Form Error');
document.frmAddPoem.title.focus(); }
else { returnValue = true; }
return returnValue;
}
</SCRIPT>
<form method="post" name="frmAddPoem" action="poetry_submit.asp" onSubmit="return CheckForm();" onReset="return ResetForm();">
<input type="hidden" name="poem" value="" />
<input type="hidden" name="browser" value="IE" />
<script language="javascript">
document.write ('<iframe src="poem_textbox.asp?pb=<%= strPoemBack %>" id=