Form Method
-
Hi to All! I have one form! and I have to do 2 process for this form. one of them is Submit another is preview. But i have to do preview in new window, submit is on same window. I found this on codeproject here is the code below
function OnButton1() { document.Form1.action = "onizleme.jsp" document.Form1.target = "_blank"; // Open in a new window document.Form1.submit(); // Submit the page return true; } function OnButton2() { document.Form1.action = "gonder.jsp" document.Form1.submit(); // Submit the page return true; } You need Javascript enabled for this to work Your Name
But problem is that: If i first click submit and second i click preview it is ok but if i first click preview and then second i click submit button, submit process open in new window. How can i handle this. Thanks for your helps Best Regards -
Hi to All! I have one form! and I have to do 2 process for this form. one of them is Submit another is preview. But i have to do preview in new window, submit is on same window. I found this on codeproject here is the code below
function OnButton1() { document.Form1.action = "onizleme.jsp" document.Form1.target = "_blank"; // Open in a new window document.Form1.submit(); // Submit the page return true; } function OnButton2() { document.Form1.action = "gonder.jsp" document.Form1.submit(); // Submit the page return true; } You need Javascript enabled for this to work Your Name
But problem is that: If i first click submit and second i click preview it is ok but if i first click preview and then second i click submit button, submit process open in new window. How can i handle this. Thanks for your helps Best RegardsSorry to all :) because i have found code that when i was post this message here is the answer
var PreviewWnd = null; function Preview() { if (Submitted) return false; PreviewWnd = open("","preview","toolbar=no,resizable=yes,scrollbars=yes,directories=no,menubar=no,width=400,height=300"); document.MessageForm.action = "onizleme.jsp"; document.MessageForm.target = "preview"; return true; } var Submitted = false; function Submit() { document.MessageForm.action = "gonder.jsp"; document.MessageForm.target = "_top"; Submitted = true; return true; } Your Name