kjmay82
asked on
Problem with one form containing two submit buttons
I have one form that runs through JavaScript validation then to a classic ASP page for processing, which is working fine. I have been asked to create a print preview page as well. I have added the JavaScript code below called by a form button, which works as expected. My problem... If the submit button is clicked without using the print preview button, all is fine. But if the print preview button is used first, then the submit button changes to also run the print preview code.
Form tag: <form method="POST" name="frmName" action="processForm.asp" onSubmit="validate();">
Submit button: <input type='submit' value=Submit'>
Print Preview button: <input type='button' value='Print Preview' onClick="SendToPreviewPage ()">
JavaScript code:
function SendToPreviewPage() {
win=window.open('','myWin' ,'toolbars =0,scrollb ars=1');
document.frmName.target='m yWin';
document.frmName.method="p ost"
document.frmName.action="p reviewForm .asp"
document.frmName.submit()
}
Thanks for any suggestions.
Form tag: <form method="POST" name="frmName" action="processForm.asp" onSubmit="validate();">
Submit button: <input type='submit' value=Submit'>
Print Preview button: <input type='button' value='Print Preview' onClick="SendToPreviewPage
JavaScript code:
function SendToPreviewPage() {
win=window.open('','myWin'
document.frmName.target='m
document.frmName.method="p
document.frmName.action="p
document.frmName.submit()
}
Thanks for any suggestions.
ASKER
Jester_48,
Thanks for your comment. Oddly enough, the printpreview code does not trigger the validation routine even though the JavaScript for that button does submit the form. The validation code does run with the regular Submit button including when the Submit button is clicked AFTER the print preview and then proceeds to that same Print Preview page.
Thanks for your comment. Oddly enough, the printpreview code does not trigger the validation routine even though the JavaScript for that button does submit the form. The validation code does run with the regular Submit button including when the Submit button is clicked AFTER the print preview and then proceeds to that same Print Preview page.
a javascript command like
document.frmName.submit()
will not trigger the validation, you need to call it explicitly, efore teh submitcode
function SendToPreviewPage() {
win=window.open('','myWin' ,'toolbars =0,scrollb ars=1');
document.frmName.target='m yWin';
document.frmName.method="p ost"
document.frmName.action="p reviewForm .asp"
if(validate()){
document.frmName.submit()
}
}
>But if the print preview button is used first, then the submit button changes to also run the print preview code.
that is because teh print preview option has overwritten the default action in teh form tag
<form method="POST" name="frmName" action="processForm.asp" onSubmit="validate();">
when this line executes teh action in the formtag becomes
<form method="POST" name="frmName" action="previewForm.asp" onSubmit="validate();">
teh change ie permanent unless teh page is reloaded or another script overwrites it again
validate(){
//validation code goies here...
if(error){
alert('error message');
}else{
document.frmName.action="p rocessForm .asp"
}
}
document.frmName.submit()
will not trigger the validation, you need to call it explicitly, efore teh submitcode
function SendToPreviewPage() {
win=window.open('','myWin'
document.frmName.target='m
document.frmName.method="p
document.frmName.action="p
if(validate()){
document.frmName.submit()
}
}
>But if the print preview button is used first, then the submit button changes to also run the print preview code.
that is because teh print preview option has overwritten the default action in teh form tag
<form method="POST" name="frmName" action="processForm.asp" onSubmit="validate();">
when this line executes teh action in the formtag becomes
<form method="POST" name="frmName" action="previewForm.asp" onSubmit="validate();">
teh change ie permanent unless teh page is reloaded or another script overwrites it again
validate(){
//validation code goies here...
if(error){
alert('error message');
}else{
document.frmName.action="p
}
}
I suggest you make the submit button a normal button, like preview. Javascript will be needed to this form to work but you are sort of committed to that anyways with the preview.
The modified code would be ...
Form tag: <form method="POST" name="frmName" action="processForm.asp" onSubmit="validate();">
Submit button: <input type='button' value=Submit' onclick='SubmitForm();'>
Print Preview button: <input type='button' value='Print Preview' onClick="SendToPreviewPage ()">
JavaScript code:
function SendToPreviewPage() {
win=window.open('','myWin' ,'toolbars =0,scrollb ars=1');
document.frmName.target='m yWin';
document.frmName.method="p ost"
document.frmName.action="p reviewForm .asp"
document.frmName.submit()
}
function SubmitForm() {
document.frmName.action="p rocessForm .asp"
document.frmName.submit();
}
Let me know if you have a question or need more info.
bol
The modified code would be ...
Form tag: <form method="POST" name="frmName" action="processForm.asp" onSubmit="validate();">
Submit button: <input type='button' value=Submit' onclick='SubmitForm();'>
Print Preview button: <input type='button' value='Print Preview' onClick="SendToPreviewPage
JavaScript code:
function SendToPreviewPage() {
win=window.open('','myWin'
document.frmName.target='m
document.frmName.method="p
document.frmName.action="p
document.frmName.submit()
}
function SubmitForm() {
document.frmName.action="p
document.frmName.submit();
}
Let me know if you have a question or need more info.
bol
you shouldn't do this
<input type='button' value=Submit' onclick='SubmitForm();'>
function SubmitForm() {
document.frmName.action="p rocessForm .asp"
document.frmName.submit();
}
you will submit the form will not call the onsubmit event
you need to add the code in the validate routine
<input type='button' value=Submit' onclick='SubmitForm();'>
function SubmitForm() {
document.frmName.action="p
document.frmName.submit();
}
you will submit the form will not call the onsubmit event
you need to add the code in the validate routine
ASKER
Jester_48: Your code got me closer a little closer. When clicking the PrintPreview button, the validation does fire but if there is a blank field, the alert message is displayed, the focus goes to the appropriate field, but it also opens a new blank window in the background. If it passes validation, a new blank window also opens. The only thing displayed in either case is the title bar which says "about:blank". However, it does set successfully set the document.frmName.action to processForm.asp. However, since I don't have any error handling (yes, I know) I put "document.frmName.action=" processFor m.asp" in the last else statement of the validation routine (see below). The Submit button also calls validation but when it finds a blank required field, it shows the alert message then immediately submits the form instead of returning to the blank field. I assume this is due to my unconventional approach to setting the form target and action in the validation.
Last section from the validation:
if (frmName.memDescription.va lue == "" || /^\s+$/.test(frmName.memDe scription. value))
{
alert("Please enter a description of the project")
frmName.memDescription.foc us();
return (false);
}
else
{
document.frmName.target='' ;
document.frmName.action="p rocessForm NEW.asp"
event.returnValue=true;
}
From the print preview code:
function SendToPreviewPage() {
win=window.open('','myWin' ,'toolbars =0,scrollb ars=1');
document.frmName.target='m yWin';
document.frmName.method="p ost"
document.frmName.action="p reviewForm .asp"
if(validate()){
document.frmName.submit()
}
}
b0lsc0tt: Yes, yours is the code I started with. Just to be sure, I copied and pasted your code into my page, took out the lines I inserted per Jester_48 in the validation, and tried it. The submit button runs the validation fine but never submits the page. The print preview button runs the validation, but after the alert message opens a blank window with the title bar (about: blank) and nothing else on the page.
Something I've done while playing with your suggestions has broken my print preview display. I'll be working to get that back next.
Thanks to you both!
Last section from the validation:
if (frmName.memDescription.va
{
alert("Please enter a description of the project")
frmName.memDescription.foc
return (false);
}
else
{
document.frmName.target=''
document.frmName.action="p
event.returnValue=true;
}
From the print preview code:
function SendToPreviewPage() {
win=window.open('','myWin'
document.frmName.target='m
document.frmName.method="p
document.frmName.action="p
if(validate()){
document.frmName.submit()
}
}
b0lsc0tt: Yes, yours is the code I started with. Just to be sure, I copied and pasted your code into my page, took out the lines I inserted per Jester_48 in the validation, and tried it. The submit button runs the validation fine but never submits the page. The print preview button runs the validation, but after the alert message opens a blank window with the title bar (about: blank) and nothing else on the page.
Something I've done while playing with your suggestions has broken my print preview display. I'll be working to get that back next.
Thanks to you both!
in oder for this lkine to work properly
if(validate()){
document.frmName.submit()
}
the validate routine needs to return a value a falkse return will not submit teh form a true return will submit
>>I assume this is due to my unconventional approach to setting the form target and action in the validation.
shouldn't matter
can you please post the entire form and js plz
if(validate()){
document.frmName.submit()
}
the validate routine needs to return a value a falkse return will not submit teh form a true return will submit
>>I assume this is due to my unconventional approach to setting the form target and action in the validation.
shouldn't matter
can you please post the entire form and js plz
Sorry, I overlooked the onsubmit event. I would just get rid of that event and call validate() as part of the onclick event for the Submit button. With 2 buttons it is best to not have one be type "submit."
I didn't look over your validate function but you could probably do what I said above with ...
function SubmitForm() {
if (!validate()) return false;
document.frmName.action="p rocessForm .asp"
document.frmName.submit();
}
Let me know if the form still isn't submitted. It would help to see your current code and the validate() function if there is still a problem. My code now will want the validate() function to return true if everything is OK or false if it isn't.
Let me know if you have a question or need more info.
bol
I didn't look over your validate function but you could probably do what I said above with ...
function SubmitForm() {
if (!validate()) return false;
document.frmName.action="p
document.frmName.submit();
}
Let me know if the form still isn't submitted. It would help to see your current code and the validate() function if there is still a problem. My code now will want the validate() function to return true if everything is OK or false if it isn't.
Let me know if you have a question or need more info.
bol
ASKER
I appreciate your help. I've got to run now and will be working on another project tommorrow (and probably through the weekend...). It will be Monday before I get back to this one.
b0lsc0tt: I'll try your code change next.
Jester_48: If I can't get b0lsc0tt's code to work, I'll post all the JS and form code on Monday.
I greatly appreciate your time. Thanks again!!
b0lsc0tt: I'll try your code change next.
Jester_48: If I can't get b0lsc0tt's code to work, I'll post all the JS and form code on Monday.
I greatly appreciate your time. Thanks again!!
ASKER
b0lsc0tt: I tried your code and the validation routine is now working on both the print preview and the submit, but neither button will then continue with the submit or preview functions. The code I'm using for your buttons is below.
Jester_48: I'm posting my validation and form code below, followed by the JavaScript which the form uses to display or hide fields.
Reminder: The validation and submit functions had been working for a few months. It was only when I tried to introduce the print preview in a separate window function that things went wrong.
Thanks to you both for any other suggestions you give.
************************** ********** ********** ********** ********** ********** ********** ****
b0lsc0tt's form buttons (buttons labeled "Monday...")
<SCRIPT language="javascript">
<!--
//submit form information to preview page
//
function SendToPreviewPageTest() {
if (!validate()) return false;
win=window.open('','myWin' ,'toolbars =0,scrollb ars=1');
document.frmISRequest.targ et='myWin' ;
document.frmISRequest.meth od="post"
document.frmISRequest.acti on="previe wForm.asp"
document.frmISRequest.subm it()
}
// -->
</SCRIPT>
<SCRIPT language="javascript">
<!--
function SubmitFormTest() {
if (!validate()) return false;
document.frmISRequest.acti on="proces sFormNEW.a sp"
document.frmISRequest.subm it();
}
// -->
</SCRIPT>
************************** ********** ********** ********** ********** ********** ********** ********** ****
Jester_48 form buttons code:
<SCRIPT language="javascript">
<!--
//submit form information to preview page
//
function SendToPreviewPage() {
win=window.open('','myWin' ,'toolbars =0,scrollb ars=1');
document.frmISRequest.targ et='myWin' ;
document.frmISRequest.meth od="post"
document.frmISRequest.acti on="previe wForm.asp"
//document.frmISRequest.su bmit()
if(validate()){
document.frmISRequest.subm it()
}
}
// -->
</SCRIPT>
<SCRIPT language="javascript">
<!--
//submit form information to preview page
//
function SendToProcessPage() {
return validate();
document.frmISRequest.meth od="post"
document.frmISRequest.acti on="proces sFormNEW.a sp"
document.frmISRequest.subm it()
}
// -->
</SCRIPT>
************************** ********** ********** ********** ********** ********** ********** ********** *********
Validation script:
<SCRIPT LANGUAGE="JavaScript">
<!--
function validate() {
if ((frmISRequest.TypeOfReque st[0].chec ked==false ) && (frmISRequest.TypeOfReques t[1].check ed==false) && (frmISRequest.TypeOfReques t[2].check ed==false) && (frmISRequest.TypeOfReques t[3].check ed==false) && (frmISRequest.TypeOfReques t[4].check ed==false) && (frmISRequest.TypeOfReques t[5].check ed==false) && (frmISRequest.TypeOfReques t[6].check ed==false) && (frmISRequest.TypeOfReques t[7].check ed==false) )
{
alert("You didn't indicate the type of request you are making.")
frmISRequest.TypeOfRequest [0].focus( );
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[5].chec ked==true) && (frmISRequest.Project.valu e.length== 0))
{
alert("You selected 'Report Development' for the type of request, but didn't enter a project name")
frmISRequest.Project.focus ();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[5].chec ked==true) && (frmISRequest.reportType[0 ].checked= =false) && (frmISRequest.reportType[1 ].checked= =false))
{
alert("You selected 'Report Development' for the type of request, but didn't a financial or management report")
frmISRequest.reportType[0] .focus();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[5].chec ked==true) && (frmISRequest.ReportName.v alue.lengt h==0))
{
alert("You selected 'Report Development' for the type of request, but didn't enter a report name")
frmISRequest.ReportName.fo cus();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[5].chec ked==true) && (frmISRequest.DataLocated. value.leng th==0))
{
alert("You selected 'Report Development' for the type of request, but didn't indicate where the data is located")
frmISRequest.DataLocated.f ocus();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[6].chec ked==true) && (frmISRequest.spPurpose.va lue.length ==0))
{
alert("You selected 'SharePoint' for the type of request, but didn't enter a purpose")
frmISRequest.spPurpose.foc us();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[6].chec ked==true) && (frmISRequest.spShortName. value.leng th==0))
{
alert("You selected 'SharePoint' for the type of request, but didn't enter a short name for the workspace")
frmISRequest.spShortName.f ocus();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[6].chec ked==true) && (frmISRequest.SPlongName.v alue.lengt h==0))
{
alert("You selected 'SharePoint' for the type of request, but didn't enter the full name for the workspace")
frmISRequest.SPlongName.fo cus();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[6].chec ked==true) && (frmISRequest.spDesignMemb ers.value. length==0) && (frmISRequest.spContribute Members.va lue.length ==0) && (frmISRequest.spReadOnlyMe mbers.valu e.length== 0))
{
alert("You selected 'SharePoint' for the type of request, but didn't enter any members for the workspace")
frmISRequest.spDesignMembe rs.focus() ;
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[6].chec ked==true) && (frmISRequest.spType[0].ch ecked==fal se) && (frmISRequest.spType[1].ch ecked==fal se))
{
alert("You selected 'SharePoint' for the type of request, but need to indicate whether this is a permanent or temporary workspace")
frmISRequest.spType[0].foc us();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[6].chec ked==true) && (frmISRequest.spType[1].ch ecked==tru e) && (frmISRequest.spEndDate.va lue.length ==0))
{
alert("You selected 'SharePoint' for the type of request and marked it as a temporary workspace, but didn't indicate when it will no longer be needed")
frmISRequest.spEndDate.foc us();
return false;
}
else
{
event.returnValue=true;
}
//format system date and date from user input form for comparison
//to make sure Requested Completion Date isn't in the past
var temp = new Date();
var today = new Date(temp.getFullYear(),te mp.getMont h(),temp.g etDate());
var datestr = document.frmISRequest.spEn dDate.valu e;
var fields = datestr.split("-");
var userdate = new Date(fields[2],fields[0]-1 ,fields[1] );
//today.setHours(0);
//today.setMinutes(0);
//today.setSeconds(0);
if(today > userdate)
{
alert("The SharePoint temporary workspace end date must not be past.");
frmISRequest.spEndDate.foc us();
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque st[7].chec ked==true) && (frmISRequest.Other.value. length==0) )
{
alert("You selected 'Other' for the type of request, but didn't enter a description")
frmISRequest.Other.focus() ;
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TimeFrame[0 ].checked= =false) && (frmISRequest.TimeFrame[1] .checked== false) && (frmISRequest.TimeFrame[2] .checked== false))
{
alert("You didn't indicate a time frame in which this project is needed")
frmISRequest.TimeFrame[0]. focus();
return false;
}
else
{
event.returnValue=true;
}
if (frmISRequest.strProgramNa me.value.l ength==0)
{
alert("Please enter the name of your project")
frmISRequest.strProgramNam e.focus();
return false;
}
else
{
event.returnValue=true;
}
if (frmISRequest.memDescripti on.value == "" || /^\s+$/.test(frmISRequest. memDescrip tion.value ))
{
alert("Please enter a description of the project")
frmISRequest.memDescriptio n.focus();
return (false);
}
else
{
document.frmISRequest.acti on="proces sFormNEW.a sp"
document.frmISRequest.targ et='';
event.returnValue=true;
}
}
// -->
</SCRIPT>
************************** ********** ********** ********** ********** ********** ********** **********
Form HTML Code:
<form method="POST" name="frmISRequest" action="processFormNEW.asp ">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="418">
<tr>
<td height="20" colspan="3"><p class="center"><b>Requeste d By </b></p></td>
</tr>
<tr>
<td width="25%" height="20">
<p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;Name:</ font></td>
<td height="20" colspan="2">
<font face="Arial"> & nbsp;  ;
<input type="hidden" name="EmpNo" value="<%=rsEmp("EmpNum")% >">
<%=Trim(rsEmp("FName")) & " " & rsEmp("LName")%></font></t d>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"><font size="2" face="Arial"> & nbsp;  ; Pho ne: </font></td>
<td height="18" colspan="2">
<font face="Arial"> & nbsp;  ;
<%=rsEmp("Extension")%></f ont></td>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;Departm ent</font> :</td>
<td height="18" colspan="2">
<font face="Arial"> & nbsp;  ;
<%=rsEmp("Department")%></ font></td>
</tr>
<tr>
<td width="25%" height="18"><p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;E-mail: </font></t d>
<td height="18" colspan="2">
<font face="Arial"> & nbsp;  ;
<%=rsEmp("Email")%></font> </td>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"></td>
<td height="18" colspan="2"> </td>
</tr>
<tr>
<td height="18" colspan="3">
<p style="text-indent: 25px"><strong><font face="Arial">Type of Request</font> </strong></p></td>
</tr>
<tr>
<td height="18" colspan="2">
<p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="New System" onClick="displayReminder() ; HideIS(this,document.getEl ementById( 'RptDevReq uest'));">
New System</font></p> </td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="Hardware" onClick="HideIS(this,docum ent.getEle mentById(' RptDevRequ est'));">
Hardware</font></p> </td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><span style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="System Access Rights" onClick="HideIS(this,docum ent.getEle mentById(' RptDevRequ est'));">
System Access Rights</font></span> </td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="System Enhancement" onClick="HideIS(this,docum ent.getEle mentById(' RptDevRequ est'));">
System Enhancement</font></p></td >
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="System Revision" onClick="HideIS(this,docum ent.getEle mentById(' RptDevRequ est'));">
System Revision</font></p></td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="3"><p style="text-indent: 25px" ><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="Report Development"
onClick="ShowIS(this,docum ent.getEle mentById(' RptDevRequ est'));">
Report Development</font></p>
<span id="RptDevRequest" style="display=none"><font face="Arial" size="2">
<p style="text-indent: 75px">Project: <input name="Project" type="text" id="Project" onBlur="CopyValue();"></p>
<p style="text-indent: 75px">
<input name="reportType" type="radio" value="Financial Report"> Financial Rpt
<input name="reportType" type="radio" value="Management Report"> Mgt Rpt </p>
<p style="text-indent: 75px">Report Name: <input name="ReportName" type="text" id="ReportName"></p>
<p style="text-indent: 75px"><font face="Arial" size="2">Where is data located?</font>
<input name="DataLocated" type="text" id="DataLocated"></p>
<!-- <p style="text-indent: 75px">Date forwarded to IS
<input name="DateForwardedToIS" type="text" id="DateForwardedToIS" onFocus="showCalendarContr ol(this);" >
</p> -->
</span></font>
</td>
</tr>
<tr>
<td height="18" colspan="3"><p style="text-indent: 25px" ><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="SharePoint"
onClick="ShowSP(this,docum ent.getEle mentById(' RptDevRequ est'));">
SharePoint Workspace</p>
<span id="spSharepoint" style="display=none">
<p style="text-indent: 75px">Purpose:
<input name="spPurpose" type="text" id="spPurpose" size="40"></p>
<p style="text-indent: 75px">Short Name </font>
<font face="Arial" size="1"><i>(20 characters)</i></font><fon t face="Arial" size="2">:
<input name="spShortName" type="text" id="spShortName" size="20" maxlength="20"></p>
<p style="text-indent: 75px">Full Name: <input name="SPlongName" type="text" id="SPlongName"></p>
<p style="text-indent: 75px">List all people using workspace by
their Role:</p>
<p style="text-indent: 75px">
Design: <input type="text" name="spDesignMembers" size="33"></p>
<p style="text-indent: 75px">
Contribute:
<input type="text" name="spContributeMembers" size="30"></p>
<p style="text-indent: 75px">
Read Only:
<input type="text" name="spReadOnlyMembers" size="30"></p>
<p style="text-indent: 75px">Type:
</p>
<p style="text-indent: 75px">
<input name="spType" type="radio" value="Permanent"
onclick="
if (this.checked) {
document.frmISRequest.spEn dDate.valu e='';
document.getElementById('s pEndDateSp an').style .display=' none';
} else {
document.getElementById('s pEndDateSp an').style .display=' inline';
}
return true;"
onblur="if (this.checked) {
document.frmISRequest.spEn dDate.valu e='';
document.getElementById('s pEndDateSp an').style .display=' none';
} else {
document.getElementById('s pEndDateSp an').style .display=' inline';
}
return true;"
>
Permanent<input name="spType" type="radio" value="Temporary"
onclick=" if (this.checked) {
document.getElementById('s pEndDateSp an').style .display=' inline';
document.frmISRequest.spEn dDate.focu s();
} else {
document.getElementById('s pEndDateSp an').style .display=' none';
}
return true;"
onblur="if (this.checked) {
document.getElementById('s pEndDateSp an').style .display=' inline';
} else {
document.getElementById('s pEndDateSp an').style .display=' none';
}
return true;" >
Temporary <span id="spEndDateSpan" style="display=none">End Date: <input type="text" name="spEndDate" size="10" onFocus="showCalendarContr ol(this);" ></span></ p>
</font>
</span>
</td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">   ; &nb sp;
<input name="TypeOfRequest" type="radio" value="Other" onClick="HideISShowOther(t his,docume nt.getElem entById('R ptDevReque st'));">
Other</font></p>
<span id="spOther" style="display=none"><font face="Arial" size="2">
<p style="text-indent: 75px"> <input name="Other" type="text" id="Other"></p></font>
</span>
</p></td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="3"></td>
</tr>
<tr>
<td height="18" colspan="3">
<p style="text-indent: 25px"><strong><font face="Arial">Time Frame </font> </strong></td>
</tr>
<tr>
<td width="25%" height="18">
<p align="left" style="text-indent: 25px"><font face="Arial" size="2">
&n bsp;
<input name="TimeFrame" type="radio" value="Urgent" >
Urgent</font></td>
<td width="27%" height="18"><div align="center">
<input name="TimeFrame" type="radio" value="Soon" ><font face="Arial" size="2">
Soon</font></div></td>
<td width="48%"><font face="Arial" size="2"><input name="TimeFrame" type="radio" value="When Time Permits" >
When Time Permits</font></td>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"></td>
<td height="18" colspan="2"></td>
</tr>
<tr>
<td colspan="3" height="18"><p style="text-indent: 25px"><b><strong><font face="Arial">System Goal</font></strong></b></ p></td>
</tr>
<tr>
<td height="18" colspan="3"><p class="center"><font face="Arial" size="2">   ; &nb sp; </font>Existing Program Name:
<input name="strProgramName" type="text" size="30">
</p> </td>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"><font size="2" face="Arial"> & nbsp;  ; Description</font></td>
<td height="18" colspan="2"> </td>
</tr>
<tr>
<td height="18" colspan="3">
<textarea name="memDescription" cols="45" rows="20"></textarea> </td>
</tr>
<tr>
<td height="18" colspan="3"> </td>
</tr>
</table>
<p align="center"><em>Informa tion cannot be edited after clicking the "Submit" button below. </em></p>
<p align="center">
<input type="button" value="Print Preview" name="btnPreview" onClick="SendToPreviewPage ()">
<input type="button" value="Submit" name="B1" onClick="SendToProcessPage ()">
<br>
<br><input type='button' value='Monday Test Submit' onclick='SubmitFormTest(); '>
<input type='button' value='Monday Test Print Preview' onClick="SendToPreviewPage Test()">
</p>
</form>
************************** ********** ********** ********** ********** ********** ********** *
Remaining JavaScript the form calls to display/hide fields:
<SCRIPT language="JavaScript">
<!--
//Copies field value in Report Development Project Name into the Existing Program Name field further down the form OnBlur
function CopyValue() {
v=document.frmISRequest.Pr oject.valu e;
document.frmISRequest.strP rogramName .value=v;
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Shows the report development related fields and positions the cursor in the Project textbox
function ShowIS(theCheckbox,theObje ct) {
spOther.style.display='non e';
document.frmISRequest.Othe r.value="" ;
document.frmISRequest.SPlo ngName.val ue="";
document.frmISRequest.spPu rpose.valu e="";
document.frmISRequest.spSh ortName.va lue="";
document.frmISRequest.spDe signMember s.value="" ;
document.frmISRequest.spEn dDate.valu e="";
document.frmISRequest.spRe adOnlyMemb ers.value= "";
document.frmISRequest.spTy pe[0].chec ked=false;
document.frmISRequest.spTy pe[1].chec ked=false;
spSharepoint.style.display ='none';
theObject.style.display='b lock';
document.frmISRequest.Proj ect.focus( );
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Hides the report development related fields and positions the cursor in the Project textbox
function HideIS(theCheckbox,theObje ct) {
document.frmISRequest.Proj ect.value= "";
document.frmISRequest.Repo rtName.val ue="";
document.frmISRequest.strP rogramName .value="";
document.frmISRequest.Data Located.va lue="";
document.frmISRequest.SPlo ngName.val ue="";
document.frmISRequest.spPu rpose.valu e="";
document.frmISRequest.spSh ortName.va lue="";
document.frmISRequest.spCo ntributeMe mbers.valu e="";
document.frmISRequest.spDe signMember s.value="" ;
document.frmISRequest.spEn dDate.valu e="";
document.frmISRequest.spRe adOnlyMemb ers.value= "";
document.frmISRequest.spTy pe[0].chec ked=false;
document.frmISRequest.spTy pe[1].chec ked=false;
spSharepoint.style.display ='none';
//document.frmISRequest.Da teForwarde dToIS.valu e="";
document.frmISRequest.repo rtType[0]. checked=fa lse;
document.frmISRequest.repo rtType[1]. checked=fa lse;
theObject.style.display='n one';
spOther.style.display='non e';
document.frmISRequest.Othe r.value="" ;
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Hides the report development and other related fields, displays the Sharepoint fields, and positions the cursor in the Purpose textbox
function ShowSP(theCheckbox,theObje ct) {
document.frmISRequest.Proj ect.value= "";
document.frmISRequest.Repo rtName.val ue="";
document.frmISRequest.strP rogramName .value="";
document.frmISRequest.Data Located.va lue="";
//document.frmISRequest.Da teForwarde dToIS.valu e="";
document.frmISRequest.repo rtType[0]. checked=fa lse;
document.frmISRequest.repo rtType[1]. checked=fa lse;
theObject.style.display='n one';
spOther.style.display='non e';
document.frmISRequest.Othe r.value="" ;
spSharepoint.style.display ='block';
document.frmISRequest.spPu rpose.focu s();
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Hides the report development and SharePoint related fields and positions the cursor in the Other textbox
function HideISShowOther(theCheckbo x,theObjec t) {
document.frmISRequest.Proj ect.value= "";
document.frmISRequest.Repo rtName.val ue="";
document.frmISRequest.Data Located.va lue="";
document.frmISRequest.strP rogramName .value="";
document.frmISRequest.SPlo ngName.val ue="";
document.frmISRequest.spPu rpose.valu e="";
document.frmISRequest.spSh ortName.va lue="";
document.frmISRequest.spCo ntributeMe mbers.valu e="";
document.frmISRequest.spDe signMember s.value="" ;
document.frmISRequest.spEn dDate.valu e="";
document.frmISRequest.spRe adOnlyMemb ers.value= "";
document.frmISRequest.spTy pe[0].chec ked=false;
document.frmISRequest.spTy pe[1].chec ked=false;
spSharepoint.style.display ='none';
//document.frmISRequest.Da teForwarde dToIS.valu e="";
document.frmISRequest.repo rtType[0]. checked=fa lse;
document.frmISRequest.repo rtType[1]. checked=fa lse;
theObject.style.display='n one';
spOther.style.display='blo ck';
document.frmISRequest.Othe r.focus();
}
// -->
</SCRIPT>
<Script Language="JavaScript">
function displayReminder()
{
alert("When requesting a new system or hardware purchase, be sure to attach a justification and/or business case to the IS Request Form before sending it to Lance.");
}
</Script>
Jester_48: I'm posting my validation and form code below, followed by the JavaScript which the form uses to display or hide fields.
Reminder: The validation and submit functions had been working for a few months. It was only when I tried to introduce the print preview in a separate window function that things went wrong.
Thanks to you both for any other suggestions you give.
**************************
b0lsc0tt's form buttons (buttons labeled "Monday...")
<SCRIPT language="javascript">
<!--
//submit form information to preview page
//
function SendToPreviewPageTest() {
if (!validate()) return false;
win=window.open('','myWin'
document.frmISRequest.targ
document.frmISRequest.meth
document.frmISRequest.acti
document.frmISRequest.subm
}
// -->
</SCRIPT>
<SCRIPT language="javascript">
<!--
function SubmitFormTest() {
if (!validate()) return false;
document.frmISRequest.acti
document.frmISRequest.subm
}
// -->
</SCRIPT>
**************************
Jester_48 form buttons code:
<SCRIPT language="javascript">
<!--
//submit form information to preview page
//
function SendToPreviewPage() {
win=window.open('','myWin'
document.frmISRequest.targ
document.frmISRequest.meth
document.frmISRequest.acti
//document.frmISRequest.su
if(validate()){
document.frmISRequest.subm
}
}
// -->
</SCRIPT>
<SCRIPT language="javascript">
<!--
//submit form information to preview page
//
function SendToProcessPage() {
return validate();
document.frmISRequest.meth
document.frmISRequest.acti
document.frmISRequest.subm
}
// -->
</SCRIPT>
**************************
Validation script:
<SCRIPT LANGUAGE="JavaScript">
<!--
function validate() {
if ((frmISRequest.TypeOfReque
{
alert("You didn't indicate the type of request you are making.")
frmISRequest.TypeOfRequest
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'Report Development' for the type of request, but didn't enter a project name")
frmISRequest.Project.focus
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'Report Development' for the type of request, but didn't a financial or management report")
frmISRequest.reportType[0]
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'Report Development' for the type of request, but didn't enter a report name")
frmISRequest.ReportName.fo
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'Report Development' for the type of request, but didn't indicate where the data is located")
frmISRequest.DataLocated.f
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'SharePoint' for the type of request, but didn't enter a purpose")
frmISRequest.spPurpose.foc
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'SharePoint' for the type of request, but didn't enter a short name for the workspace")
frmISRequest.spShortName.f
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'SharePoint' for the type of request, but didn't enter the full name for the workspace")
frmISRequest.SPlongName.fo
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'SharePoint' for the type of request, but didn't enter any members for the workspace")
frmISRequest.spDesignMembe
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'SharePoint' for the type of request, but need to indicate whether this is a permanent or temporary workspace")
frmISRequest.spType[0].foc
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'SharePoint' for the type of request and marked it as a temporary workspace, but didn't indicate when it will no longer be needed")
frmISRequest.spEndDate.foc
return false;
}
else
{
event.returnValue=true;
}
//format system date and date from user input form for comparison
//to make sure Requested Completion Date isn't in the past
var temp = new Date();
var today = new Date(temp.getFullYear(),te
var datestr = document.frmISRequest.spEn
var fields = datestr.split("-");
var userdate = new Date(fields[2],fields[0]-1
//today.setHours(0);
//today.setMinutes(0);
//today.setSeconds(0);
if(today > userdate)
{
alert("The SharePoint temporary workspace end date must not be past.");
frmISRequest.spEndDate.foc
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TypeOfReque
{
alert("You selected 'Other' for the type of request, but didn't enter a description")
frmISRequest.Other.focus()
return false;
}
else
{
event.returnValue=true;
}
if ((frmISRequest.TimeFrame[0
{
alert("You didn't indicate a time frame in which this project is needed")
frmISRequest.TimeFrame[0].
return false;
}
else
{
event.returnValue=true;
}
if (frmISRequest.strProgramNa
{
alert("Please enter the name of your project")
frmISRequest.strProgramNam
return false;
}
else
{
event.returnValue=true;
}
if (frmISRequest.memDescripti
{
alert("Please enter a description of the project")
frmISRequest.memDescriptio
return (false);
}
else
{
document.frmISRequest.acti
document.frmISRequest.targ
event.returnValue=true;
}
}
// -->
</SCRIPT>
**************************
Form HTML Code:
<form method="POST" name="frmISRequest" action="processFormNEW.asp
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="418">
<tr>
<td height="20" colspan="3"><p class="center"><b>Requeste
</tr>
<tr>
<td width="25%" height="20">
<p style="text-indent: 25px"><font face="Arial" size="2">  
<td height="20" colspan="2">
<font face="Arial"> &
<input type="hidden" name="EmpNo" value="<%=rsEmp("EmpNum")%
<%=Trim(rsEmp("FName")) & " " & rsEmp("LName")%></font></t
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"><font size="2" face="Arial"> &
<td height="18" colspan="2">
<font face="Arial"> &
<%=rsEmp("Extension")%></f
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"><font face="Arial" size="2">  
<td height="18" colspan="2">
<font face="Arial"> &
<%=rsEmp("Department")%></
</tr>
<tr>
<td width="25%" height="18"><p style="text-indent: 25px"><font face="Arial" size="2">  
<td height="18" colspan="2">
<font face="Arial"> &
<%=rsEmp("Email")%></font>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"></td>
<td height="18" colspan="2"> </td>
</tr>
<tr>
<td height="18" colspan="3">
<p style="text-indent: 25px"><strong><font face="Arial">Type of Request</font> </strong></p></td>
</tr>
<tr>
<td height="18" colspan="2">
<p style="text-indent: 25px"><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="New System" onClick="displayReminder()
New System</font></p> </td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="Hardware" onClick="HideIS(this,docum
Hardware</font></p> </td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><span style="text-indent: 25px"><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="System Access Rights" onClick="HideIS(this,docum
System Access Rights</font></span> </td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="System Enhancement" onClick="HideIS(this,docum
System Enhancement</font></p></td
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="System Revision" onClick="HideIS(this,docum
System Revision</font></p></td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="3"><p style="text-indent: 25px" ><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="Report Development"
onClick="ShowIS(this,docum
Report Development</font></p>
<span id="RptDevRequest" style="display=none"><font
<p style="text-indent: 75px">Project: <input name="Project" type="text" id="Project" onBlur="CopyValue();"></p>
<p style="text-indent: 75px">
<input name="reportType" type="radio" value="Financial Report"> Financial Rpt
<input name="reportType" type="radio" value="Management Report"> Mgt Rpt </p>
<p style="text-indent: 75px">Report Name: <input name="ReportName" type="text" id="ReportName"></p>
<p style="text-indent: 75px"><font face="Arial" size="2">Where is data located?</font>
<input name="DataLocated" type="text" id="DataLocated"></p>
<!-- <p style="text-indent: 75px">Date forwarded to IS
<input name="DateForwardedToIS" type="text" id="DateForwardedToIS" onFocus="showCalendarContr
</p> -->
</span></font>
</td>
</tr>
<tr>
<td height="18" colspan="3"><p style="text-indent: 25px" ><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="SharePoint"
onClick="ShowSP(this,docum
SharePoint Workspace</p>
<span id="spSharepoint" style="display=none">
<p style="text-indent: 75px">Purpose:
<input name="spPurpose" type="text" id="spPurpose" size="40"></p>
<p style="text-indent: 75px">Short Name </font>
<font face="Arial" size="1"><i>(20 characters)</i></font><fon
<input name="spShortName" type="text" id="spShortName" size="20" maxlength="20"></p>
<p style="text-indent: 75px">Full Name: <input name="SPlongName" type="text" id="SPlongName"></p>
<p style="text-indent: 75px">List all people using workspace by
their Role:</p>
<p style="text-indent: 75px">
Design: <input type="text" name="spDesignMembers" size="33"></p>
<p style="text-indent: 75px">
Contribute:
<input type="text" name="spContributeMembers"
<p style="text-indent: 75px">
Read Only:
<input type="text" name="spReadOnlyMembers" size="30"></p>
<p style="text-indent: 75px">Type:
</p>
<p style="text-indent: 75px">
<input name="spType" type="radio" value="Permanent"
onclick="
if (this.checked) {
document.frmISRequest.spEn
document.getElementById('s
} else {
document.getElementById('s
}
return true;"
onblur="if (this.checked) {
document.frmISRequest.spEn
document.getElementById('s
} else {
document.getElementById('s
}
return true;"
>
Permanent<input name="spType" type="radio" value="Temporary"
onclick=" if (this.checked) {
document.getElementById('s
document.frmISRequest.spEn
} else {
document.getElementById('s
}
return true;"
onblur="if (this.checked) {
document.getElementById('s
} else {
document.getElementById('s
}
return true;" >
Temporary <span id="spEndDateSpan" style="display=none">End Date: <input type="text" name="spEndDate" size="10" onFocus="showCalendarContr
</font>
</span>
</td>
</tr>
<tr>
<td height="18" colspan="2"><p style="text-indent: 25px"><font face="Arial" size="2">  
<input name="TypeOfRequest" type="radio" value="Other" onClick="HideISShowOther(t
Other</font></p>
<span id="spOther" style="display=none"><font
<p style="text-indent: 75px"> <input name="Other" type="text" id="Other"></p></font>
</span>
</p></td>
<td height="18"> </td>
</tr>
<tr>
<td height="18" colspan="3"></td>
</tr>
<tr>
<td height="18" colspan="3">
<p style="text-indent: 25px"><strong><font face="Arial">Time Frame </font> </strong></td>
</tr>
<tr>
<td width="25%" height="18">
<p align="left" style="text-indent: 25px"><font face="Arial" size="2">
&n
<input name="TimeFrame" type="radio" value="Urgent" >
Urgent</font></td>
<td width="27%" height="18"><div align="center">
<input name="TimeFrame" type="radio" value="Soon" ><font face="Arial" size="2">
Soon</font></div></td>
<td width="48%"><font face="Arial" size="2"><input name="TimeFrame" type="radio" value="When Time Permits" >
When Time Permits</font></td>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"></td>
<td height="18" colspan="2"></td>
</tr>
<tr>
<td colspan="3" height="18"><p style="text-indent: 25px"><b><strong><font face="Arial">System Goal</font></strong></b></
</tr>
<tr>
<td height="18" colspan="3"><p class="center"><font face="Arial" size="2">  
<input name="strProgramName" type="text" size="30">
</p> </td>
</tr>
<tr>
<td width="25%" height="18">
<p style="text-indent: 25px"><font size="2" face="Arial"> &
<td height="18" colspan="2"> </td>
</tr>
<tr>
<td height="18" colspan="3">
<textarea name="memDescription" cols="45" rows="20"></textarea> </td>
</tr>
<tr>
<td height="18" colspan="3"> </td>
</tr>
</table>
<p align="center"><em>Informa
<p align="center">
<input type="button" value="Print Preview" name="btnPreview" onClick="SendToPreviewPage
<input type="button" value="Submit" name="B1" onClick="SendToProcessPage
<br>
<br><input type='button' value='Monday Test Submit' onclick='SubmitFormTest();
<input type='button' value='Monday Test Print Preview' onClick="SendToPreviewPage
</p>
</form>
**************************
Remaining JavaScript the form calls to display/hide fields:
<SCRIPT language="JavaScript">
<!--
//Copies field value in Report Development Project Name into the Existing Program Name field further down the form OnBlur
function CopyValue() {
v=document.frmISRequest.Pr
document.frmISRequest.strP
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Shows the report development related fields and positions the cursor in the Project textbox
function ShowIS(theCheckbox,theObje
spOther.style.display='non
document.frmISRequest.Othe
document.frmISRequest.SPlo
document.frmISRequest.spPu
document.frmISRequest.spSh
document.frmISRequest.spDe
document.frmISRequest.spEn
document.frmISRequest.spRe
document.frmISRequest.spTy
document.frmISRequest.spTy
spSharepoint.style.display
theObject.style.display='b
document.frmISRequest.Proj
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Hides the report development related fields and positions the cursor in the Project textbox
function HideIS(theCheckbox,theObje
document.frmISRequest.Proj
document.frmISRequest.Repo
document.frmISRequest.strP
document.frmISRequest.Data
document.frmISRequest.SPlo
document.frmISRequest.spPu
document.frmISRequest.spSh
document.frmISRequest.spCo
document.frmISRequest.spDe
document.frmISRequest.spEn
document.frmISRequest.spRe
document.frmISRequest.spTy
document.frmISRequest.spTy
spSharepoint.style.display
//document.frmISRequest.Da
document.frmISRequest.repo
document.frmISRequest.repo
theObject.style.display='n
spOther.style.display='non
document.frmISRequest.Othe
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Hides the report development and other related fields, displays the Sharepoint fields, and positions the cursor in the Purpose textbox
function ShowSP(theCheckbox,theObje
document.frmISRequest.Proj
document.frmISRequest.Repo
document.frmISRequest.strP
document.frmISRequest.Data
//document.frmISRequest.Da
document.frmISRequest.repo
document.frmISRequest.repo
theObject.style.display='n
spOther.style.display='non
document.frmISRequest.Othe
spSharepoint.style.display
document.frmISRequest.spPu
}
// -->
</SCRIPT>
<SCRIPT language="JavaScript">
<!--
//Hides the report development and SharePoint related fields and positions the cursor in the Other textbox
function HideISShowOther(theCheckbo
document.frmISRequest.Proj
document.frmISRequest.Repo
document.frmISRequest.Data
document.frmISRequest.strP
document.frmISRequest.SPlo
document.frmISRequest.spPu
document.frmISRequest.spSh
document.frmISRequest.spCo
document.frmISRequest.spDe
document.frmISRequest.spEn
document.frmISRequest.spRe
document.frmISRequest.spTy
document.frmISRequest.spTy
spSharepoint.style.display
//document.frmISRequest.Da
document.frmISRequest.repo
document.frmISRequest.repo
theObject.style.display='n
spOther.style.display='blo
document.frmISRequest.Othe
}
// -->
</SCRIPT>
<Script Language="JavaScript">
function displayReminder()
{
alert("When requesting a new system or hardware purchase, be sure to attach a justification and/or business case to the IS Request Form before sending it to Lance.");
}
</Script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
b0lsc0tt:
I left this one line in the validation code
document.frmISRequest.targ et='';
and it is working just as I wanted. Thank you so very much!
Kathy
I left this one line in the validation code
document.frmISRequest.targ
and it is working just as I wanted. Thank you so very much!
Kathy
Your welcome! I'm glad I could help. Thanks for the grade, the points and the fun question.
bol
bol
so if the form validate succesfully, meaning without error, reset teh action and then it will siubmit properly