Hi All,
I need to return the results of my JS file to my webpage. How would I return myTwoMonths, myThreeMonths and myFourMonths to replace the static months?
function setMonths(_form) {
var tMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December"
var currDate = new Date();
//Getting current month. For Pooled Sweep it's two months prior to
//current month.
var twoPriorMonths = currDate.getMonth()-2;
var myTwoMonths = tMonth[twoPriorMonths];
//Getting second month. Three months prior to current month.
var threePriorMonths = currDate.getMonth()-3;
var myThreeMonths = tMonth[threePriorMonths];
//Getting third month. Four months prior to current month.
var fourPriorMonths = currDate.getMonth()-4;
var myFourMonths = tMonth[fourPriorMonths];
}
Following is my HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type"
content="text/html; charset=WINDOWS-1252">
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>psweep_Report_Archive.jsp</TITLE>
<LINK rel="stylesheet" type="text/css" href="../service/js/isc-style.css" title="Standard ISC Style">
<SCRIPT language="JavaScript" src="../service/js/archive_dates.js"></SCRIPT>
</HEAD>
<BODY onload="javascript:setMonths('rptPooledSweepArchiveForm');">
<FORM name="rptPooledSweepArchiveForm" action="../isc/PooledSweepServlet">
<BR>
<BR>
<TABLE border="0" align="center" width="170">
<TBODY>
<TR>
<TH align="middle"><FONT size="2"><b>Archive Reports</b></FONT></TH>
</TR>
<TR>
<TD> </TD>
</TR>
<OL>
<TR>
<TD><LI>June</LI></TD>
</TR>
<TR>
<TD><LI>May</LI></TD>
</TR>
<TR>
<TD><LI>April</LI></TD>
</TR>
</OL>
</TBODY>
</TABLE>
</FORM>
</BODY>
</HTML>
Thanks for your help.
Tim
I need to return the results of my JS file to my webpage. How would I return myTwoMonths, myThreeMonths and myFourMonths to replace the static months?
function setMonths(_form) {
var tMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December"
var currDate = new Date();
//Getting current month. For Pooled Sweep it's two months prior to
//current month.
var twoPriorMonths = currDate.getMonth()-2;
var myTwoMonths = tMonth[twoPriorMonths];
//Getting second month. Three months prior to current month.
var threePriorMonths = currDate.getMonth()-3;
var myThreeMonths = tMonth[threePriorMonths];
//Getting third month. Four months prior to current month.
var fourPriorMonths = currDate.getMonth()-4;
var myFourMonths = tMonth[fourPriorMonths];
}
Following is my HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type"
content="text/html; charset=WINDOWS-1252">
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>psweep_Report_Archive.jsp</TITLE>
<LINK rel="stylesheet" type="text/css" href="../service/js/isc-style.css" title="Standard ISC Style">
<SCRIPT language="JavaScript" src="../service/js/archive_dates.js"></SCRIPT>
</HEAD>
<BODY onload="javascript:setMonths('rptPooledSweepArchiveForm');">
<FORM name="rptPooledSweepArchiveForm" action="../isc/PooledSweepServlet">
<BR>
<BR>
<TABLE border="0" align="center" width="170">
<TBODY>
<TR>
<TH align="middle"><FONT size="2"><b>Archive Reports</b></FONT></TH>
</TR>
<TR>
<TD> </TD>
</TR>
<OL>
<TR>
<TD><LI>June</LI></TD>
</TR>
<TR>
<TD><LI>May</LI></TD>
</TR>
<TR>
<TD><LI>April</LI></TD>
</TR>
</OL>
</TBODY>
</TABLE>
</FORM>
</BODY>
</HTML>
Thanks for your help.
Tim