recpack
02-02-2009, 08:54 PM
Greetings.
(Short version:) on a asp page, fill out the form and press submit. It takes you to a thank you page, at that point I want it to go BACk to the form.
(Detailed:) For my work, we have a web based ticket system, and add notes to these via asp pages. I came up with some code to auto file the text, change combo box's then submit itself. Upon submit it takes to a simple "Thank You page" .... after .submit I would like it to go back to the origional "frmAddnote" page. I have tried everything for 2 weeks including:
history.back();
or
history.go(-1)
or
window.back.... etc with no luck... It just sticks to the "Thank you" page..
I have searched the best I can, and am fluent in VB6 but pretty new to JScript and asp..... Here is my code:
<SCRIPT LANGUAGE = "JavaScript">
//Current window is tpl_pr_addnote.asp
//The form name is frmAddnote
var exwin = external.menuArguments;
var exdoc = exwin.document;
var exobj = exwin.event.srcElement;
exobj.value = exobj.value + "TEST TICKET 020109";
function blockError(){return true;}
window.onerror = blockError;
exdoc.all.namedItem("lstOpenCode").value = "PENDING";
exdoc.all.namedItem("lstActionId").value = "UPDATE";
//submit form (this is the only way I have gotten it to submit)
exwin.document.forms[0].action="../../bin/files/wcls_pr_AddNoteFinish.asp";
exwin.document.forms[0].submit();
//This is where the "Thank you" screen comes up and sits like a donkey.
//This is also the location where I have been putting the codes mentioned // above.
</SCRIPT>
Any help or guidence would be greatly appriciated, it's driving me nuts for such a simple move..... Thanks in Advance - Greg :)
(Short version:) on a asp page, fill out the form and press submit. It takes you to a thank you page, at that point I want it to go BACk to the form.
(Detailed:) For my work, we have a web based ticket system, and add notes to these via asp pages. I came up with some code to auto file the text, change combo box's then submit itself. Upon submit it takes to a simple "Thank You page" .... after .submit I would like it to go back to the origional "frmAddnote" page. I have tried everything for 2 weeks including:
history.back();
or
history.go(-1)
or
window.back.... etc with no luck... It just sticks to the "Thank you" page..
I have searched the best I can, and am fluent in VB6 but pretty new to JScript and asp..... Here is my code:
<SCRIPT LANGUAGE = "JavaScript">
//Current window is tpl_pr_addnote.asp
//The form name is frmAddnote
var exwin = external.menuArguments;
var exdoc = exwin.document;
var exobj = exwin.event.srcElement;
exobj.value = exobj.value + "TEST TICKET 020109";
function blockError(){return true;}
window.onerror = blockError;
exdoc.all.namedItem("lstOpenCode").value = "PENDING";
exdoc.all.namedItem("lstActionId").value = "UPDATE";
//submit form (this is the only way I have gotten it to submit)
exwin.document.forms[0].action="../../bin/files/wcls_pr_AddNoteFinish.asp";
exwin.document.forms[0].submit();
//This is where the "Thank you" screen comes up and sits like a donkey.
//This is also the location where I have been putting the codes mentioned // above.
</SCRIPT>
Any help or guidence would be greatly appriciated, it's driving me nuts for such a simple move..... Thanks in Advance - Greg :)