ApletFX
11-18-2003, 09:40 PM
Hello, I am working on a message forum and have found myself in a jam. Hopefully you guys can help.
I have a form with both a preview button and a submit button. The preview button targets a popup window to a specified size. I need the form data to post to that popup page without actually submitting the page. I want the visitor to preview the post before submitting the form to the DataBase. below is the code that I have so far. The button is working, it generates a popup window as it should but does not send the data. Here is a link to see a work up of the form
http://pixeljunkie.org/forum/inc_replytest.cfm
<script language="javascript">
function WinOpen(url,x,y) {
var attributes = "toolbar=no,scrollbars=yes,resizable=yes,width=" + x + ",height=" + y;
msgWindow=window.open(url,"WinOpen",attributes);
}
</script>
<form action="index.cfm" method="post" enctype="multipart/form-data" name="PostTopic" id="PostTopic">
<textarea name="message" cols="60" rows="8" id="message"></textarea>
<input name="Preview" type="button" class="normalbuttons" onclick="WinOpen('previewmessages.cfm','550','400'); return true;" value=" Preview ">
<input type="submit" name="Sumbit" class="normalbuttons" value=" Reply to Post " onClick="if(this.value == ' Reply to Post ') this.form.submit(); this.value = ' Please Wait... ';">
Thanks in advance for your help
I have a form with both a preview button and a submit button. The preview button targets a popup window to a specified size. I need the form data to post to that popup page without actually submitting the page. I want the visitor to preview the post before submitting the form to the DataBase. below is the code that I have so far. The button is working, it generates a popup window as it should but does not send the data. Here is a link to see a work up of the form
http://pixeljunkie.org/forum/inc_replytest.cfm
<script language="javascript">
function WinOpen(url,x,y) {
var attributes = "toolbar=no,scrollbars=yes,resizable=yes,width=" + x + ",height=" + y;
msgWindow=window.open(url,"WinOpen",attributes);
}
</script>
<form action="index.cfm" method="post" enctype="multipart/form-data" name="PostTopic" id="PostTopic">
<textarea name="message" cols="60" rows="8" id="message"></textarea>
<input name="Preview" type="button" class="normalbuttons" onclick="WinOpen('previewmessages.cfm','550','400'); return true;" value=" Preview ">
<input type="submit" name="Sumbit" class="normalbuttons" value=" Reply to Post " onClick="if(this.value == ' Reply to Post ') this.form.submit(); this.value = ' Please Wait... ';">
Thanks in advance for your help