473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script not working

Rob
Access Gurus,
This script was used to view the reports on the web by choosing a
date on or before the current day.Recently it stopped working and i am
not able to figure where the problem is.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<HEAD>

<TITLE>Servic e Quality & Projects_home</TITLE>

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<LINK href="http://www.citigroup.n et/" type=text/css
rel=stylesheet> <!-- netscape 4.x compatible -->
<STYLE TYPE="text/css">@import
url(http://www.citigroup.n et/ti);</STYLE><!-- modern browser
compatible -->
<LINK href="../css/custom_style.cs s" type=text/css rel=stylesheet> <!--
your custom styles here -->

<script LANGUAGE="JavaS cript">
<!--
// These are the GLOBAL VARIABLES
var theMonth= "01";
var theDay= "01";
var theYear= "00";
var rep_name = ".pdf";
//------------------------------------------------------------
//This function checks whether it is a leap year
function CheckLeap(year)
{
if ((year % 400) == 0) return 1;
if ((year % 100) == 0) return 0;
if ((year % 4) == 0) return 1;
return 0;
}
function CheckDate(year, month, day){
if ((day == "29") && (month == "02"))
return CheckLeap(year) ;
month = month - 1;
day = day;
if ((month == "00")||(mon th == "02")||(mon th == "04")||(mon th
== "06")||(mon th == "07")||(mon th == "09")||(mon th == "11"))
{if (day <= 31) return 1;
else return 0;}
if (month == "01")
{if (day <= 28) return 1;
else return 0;}
else
{if (day <= 30) return 1;
else return 0;}
}
//This function defines the names for the month
function nameMonth(month ){
var monthName;
if (month == "01"){month Name = "January";}
if (month == "02"){month Name = "February"; }
if (month == "03"){month Name = "March";}
if (month == "04"){month Name = "April";}
if (month == "05"){month Name = "May";}
if (month == "06"){month Name = "June";}
if (month == "07"){month Name = "July";}
if (month == "08"){month Name = "August";}
if (month == "09"){month Name = "September" ;}
if (month == "10"){month Name = "October";}
if (month == "11"){month Name = "November"; }
if (month == "12"){month Name = "December"; }
return monthName;
}
//line 81------------------------------------------------------------
function minError(minYea r, minMonth, minDay)
{
var minDate = new Date();
minDate.setMont h(minMonth-1);
minDate.setDate (minDay);
minDate.setYear (minYear);
document.open() ;
document.write( "<HTML><BOD Y
background='ima ges/backer.gif'><LE FT><FONT
SIZE=4><BR>&nbs p;&nbsp;&nbsp;E rror: Invalid
Date<BR></FONT></LEFT><CENTER><F ONT SIZE=2><BR>You have selected an
invalid date. Please select another date.");
document.close( );
}
//------------------------------------------------------------
function maxError(year, month, day)
{
var date = new Date();
date.setMonth(m onth-1);
date.setDate(da y);
date.setYear(ye ar);
document.open() ;
document.write( "<HTML><BOD Y
background='ima ges/backer.gif'><LE FT><FONT
SIZE=4><BR>&nbs p;&nbsp;&nbsp;E rror: Invalid
Date<BR></FONT></LEFT><CENTER><F ONT SIZE=2><BR>You have selected an
invalid date. Please select another date.");
document.write( "<BR><BR>Yo u have followed a link to a report
which is either not yet available or does not exist on the site.");
document.write( "<BR>If you have any questions or problems,
please e-mail the ");

document.close( );
}
//line 113------------------------------------------------------------
function LIST(theform)
{
var year;
var t_year;
var month;
var t_month;
var day;
var t_day;
var date = new Date();
var today = new Date();
var minDay;
var minMonth;
var minYear;

month = theform.Month[theform.Month.s electedIndex].value;
day = theform.Day[theform.Day.sel ectedIndex].value;
theYear = theform.YEAR[theform.YEAR.se lectedIndex].value;
minDay = 01;
minMonth = 01;
minYear = 03;

t_year = today.getYear() ;
t_day = today.getDate() + 1;
t_month = today.getMonth( )+ 1;

if (CheckDate(year , month, day) == 1){
if ((year < minYear) || ((month < minMonth) && (year == minYear)) ||
((day < minDay) && (month == minMonth) && (year == minYear)))
{
minError(minYea r, minMonth, minDay);
}
else if ((year > t_year) || ((month > t_month) && (year == t_year))
|| ((day >= t_day) && (month == t_month) && (year == t_year))){
maxError(year, month, day);
}
else{
theMonth = month;
theDay = day;
location.href=" http://www.citigroup.n et/remedyreports/" +
theYear + theMonth + theDay + rep_name;
location.target = "_top"
}
}

else{
document.open() ;
document.write( "<HTML><BOD Y
background='ima ges/backer.gif'><LE FT><FONT
SIZE=4><BR>&nbs p;&nbsp;&nbsp;E rror: Invalid
Date<BR></FONT></LEFT><CENTER><F ONT SIZE=2><BR>You have selected an
invalid date. Please select another date.");
document.close( );
}
}
//line 166------------------------------------------------------------
function LastDay()
{
var today = new Date();
var check, year, Month, lastMonth;

year = today.getYear() ;
Month = today.getMonth( );
if (Month == "00") lastMonth = 12;
else lastMonth = Month;
if ((lastMonth == 1)||(lastMonth == 3)||(lastMonth ==
5)||(lastMonth == 7)||(lastMonth == 8)||(lastMonth == 10)||(lastMonth
== 12))
return 31;
if (lastMonth == 2)
{
check = CheckLeap(year) ;
if (check == 1) return 29;
else return 28;
}
else return 30;
}
//line186------------------------------------------------------------
function SetDate()
{
var today = new Date();

document.thefor m.Day.selectedI ndex = today.getDate() - 1;
document.thefor m.Month.selecte dIndex = today.getMonth( );

if (today.getYear( ) < 100)
document.thefor m.YEAR.selected Index = today.getYear()
- 99;
else
document.thefor m.YEAR.selected Index = today.getYear()
- 1999;
// LIST(document.t heform);
}
//line 200------------------------------------------------------------

function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf ("?"))>0&&paren t.frames.length ) {
d=parent.frames[n.substring(p+1 )].document; n=n.substring(0 ,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.fo rms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.l ayers&&i<d.laye rs.length;i++)
x=MM_findObj(n, d.layers[i].document);
if(!x && document.getEle mentById) x=document.getE lementById(n);
return x;
}
function MM_nbGroup(even t, grpName) { //v3.0
var i,img,nbArr,arg s=MM_nbGroup.ar guments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr =
document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img =
MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbO ver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbO ver.length; i++) {
img = document.MM_nbO ver[i]; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
if ((nbArr = document[grpName]) != null)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src =
img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
}
function MM_swapImgResto re() { //v3.0
var i,x,a=document. MM_sr;
for(i=0;a&&i<a. length&&(x=a[i])&&x.oSrc;i++ ) x.src=x.oSrc;
}
function MM_preloadImage s() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.leng th,a=MM_preload Images.argument s; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!= 0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_sw apImage.argumen ts; document.MM_sr= new Array;
for(i=0;i<(a.le ngth-2);i+=3)
if ((x=MM_findObj( a[i]))!=null){docum ent.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>

<BODY>
<a name="top"></a>
<script language="JavaS cript" <DIV class=iehackwra p>
<DIV class=boxwrap>
<DIV class=boxheader > </DIV>
<DIV class=boxbody>
<DIV class=boxleft>
<DIV id="searchbox" >
<FORM name="searchfor m" method="get"
action="http://search.citicorp .com/cgi-bin/query">
<INPUT TYPE="hidden" NAME="mss" VALUE="citigrou pnetsimp">
<INPUT TYPE="hidden" NAME="pg" VALUE="q">
<INPUT TYPE="hidden" NAME="what" VALUE="web">
<INPUT TYPE="hidden" NAME="fmt" VALUE="d">
<SPAN ID="ie_input">
<INPUT NAME=q SIZE=16 MAXLENGTH=200 VALUE="Search TI...">
</SPAN> <SPAN ID="nn_input">
<INPUT NAME=q SIZE=8 MAXLENGTH=200 VALUE="Search TI...">
</SPAN>
<INPUT type=image
src="http://www.citigroup.n et/ti/images/search1.gif" border="0"
alt="search" name="search">
</form>
</DIV>
<!--<DIV class=boxleftne ws>
<!--TAG GENERATOR: OpenCube - Applet Composer,
(www.opencube.c om)-->
<!--OpenCube Copyright Notice Parameter-->
<!-- <param name="Notice" value="Smooth Scroll Up
II, Copyright (c) 1999, OpenCube Inc.">
<!--General / Default Settings-->
<!-- <param name="bgcolor" value="0,0,102" >
<!-- <param name="textcolor " value="255,255, 255">
<!-- <param name="font" value="SansSeri f,Plain,11">
<!-- <param name="halign" value="Left">
<!-- <param name="lrmargin" value="5">
<!-- <param name="hlcolor" value="116,189, 200">
<!-- <param name="scrolldel ay" value="25">
<!--Specific Settings-->
<!-- <param name="desc0" value="Last Updated: ">
<!-- <param name="delay0" value="2000">
<!-- <param name="desc1" value=" ">
<!-- <param name="desc2" value="Your optional new
here...">
<!-- <param name="textcolor 2" value="205,227, 253">
<!-- <param name="font2" value="SansSeri f,Bold,12">
<!-- <param name="delay2" value="4000">
<!-- <param name="desc3" value="Your optional news
here...">
<!-- <param name="desc4" value=" ">
<!-- <param name="desc5" value="Your optional news
here...">
<!-- <param name="delay5" value="6000">
<!-- <param name="desc6" value=" ">
<!-- <param name="desc7" value="Your optional news
here...">
<!-- <param name="delay7" value="6000">
<!-- </applet>
<!--<pre></pre>
<!--<img src="http://www.citigroup.n et/ti/images/optional_image. gif"
width="160" height="176" alt="Branding Graphic">

</DIV>-->
<!-- Three lines below are a test. they exist within "nav"
tag of 2col realworld code -->
</DIV>
<DIV class=boxcenter >
<!-- below is custom content -->
<p><font size="4" color="#4092BF" ><i><img
src="images/SiteSpecific/head_performanc e.gif" width="350"
height="77"></i></font></p>
<table width="100%" border="0">
<tr>
<td colspan="3" height="35" valign="baselin e"
align="right">
<blockquote>
<p align="left"><b ><font size="4"
color="#006666" >North America
Data Centers<br>
</font></b><b><font size="4" color="#006666" >Problem
Resolution
Center (PRC)</font></b></p>
</blockquote>
</td>
</tr>
<tr>
<td colspan="3" height="180" valign="top"> <left></left>
<blockquote>
<p>
<center>
<font size="2">The objective of the Remedy Report
is:<br>
<br>
&nbsp;&nbsp; 1) To Provide a daily overview of
Remedy ticket
performance for the PRC and some SDTs against
standard&nbsp;< br>
&nbsp;&nbsp; 2) To help Problem Resolvers (Queue
Managers)
meet the RemedyService Levels<br>
&nbsp;&nbsp; 3) To serve as a basis for ongoing
performace
improvements </font>
</center>
</p>
</blockquote>
<center>
<p align="center"> <font size="2"><font size="1">Note:
See the
Report Overview on page 1 of the report for a full
explanation
of all report fields</font><left></left></font></p>
<hr>
<font size="3"><b>Pre view a Report</b></font><br>
Select the Report Date below<br>
<form SUBMIT name="theform">
<font color="#000000" size="2">Date:
<select size="1" name="Month">
<option value="01" >January </option>
<option value="02">Febr uary </option>
<option value="03">Marc h </option>
<option value="04">Apri l </option>
<option value="05" selected>May </option>
<option value="06">June </option>
<option value="07">July </option>
<option value="08">Augu st </option>
<option value="09">Sept ember </option>
<option value="10">Octo ber </option>
<option value="11">Nove mber </option>
<option value="12">Dece mber </option>
</select>

<select size="1" name="Day">
<option selected value="01"> 1 </option>
<option value="02"> 2 </option>
<option value="03"> 3 </option>
<option value="04"> 4 </option>
<option value="05"> 5 </option>
<option value="06"> 6 </option>
<option value="07"> 7 </option>
<option value="08"> 8 </option>
<option value="09"> 9 </option>
<option value="10"> 10 </option>
<option value="11"> 11 </option>
<option value="12"> 12 </option>
<option value="13"> 13 </option>
<option value="14"> 14 </option>
<option value="15"> 15 </option>
<option value="16"> 16 </option>
<option value="17"> 17 </option>
<option value="18"> 18 </option>
<option value="19"> 19 </option>
<option value="20"> 20 </option>
<option value="21"> 21 </option>
<option value="22"> 22 </option>
<option value="23"> 23 </option>
<option value="24"> 24 </option>
<option value="25"> 25 </option>
<option value="26"> 26 </option>
<option value="27"> 27 </option>
<option value="28"> 28 </option>
<option value="29"> 29 </option>
<option value="30"> 30 </option>
<option value="31"> 31 </option>
</select>
&nbsp;
<select size="1" name="YEAR">
<option value="03">2003 </option>
<option value="04" selected>2004</option>
<option value="05">2005 </option>
</select>
<br>
Please note that the report date selected above is a
day after
the &quot;work of&quot; date<br>
<input type="button" value="Get the Report"
onClick="LIST(t heform)" name="button">
</font>
</form>
<p><font size="1"> Reports earlier than January 01,
2003 are not
available on this site.<br>
All reports are in Adobe Acrobat format</font></p>
</center>
</td>
</tr>
</table>
<p>&nbsp;</p>
</DIV>
</DIV>
</DIV>
</DIV>
<blockquote>
<DIV class=iehackwra p>
<DIV class=boxwrap>
<DIV class=boxbody> </DIV>
</DIV>
</DIV>
</blockquote>
<DIV class=iehackwra p>
<DIV class=boxwrap>
<DIV class=boxbody>
<DIV class=boxcenter >
<p>
<script>documen t.write('<BLOCK QUOTE><P id="lastupdate "
ALIGN=center><I >Last updated on ',
document.lastMo dified,'.</I></P></BLOCKQUOTE>')</script>
<!-- Three lines below are a test. they exist within
"content" tag of 2col realworld code -->
</p>
</DIV>
</DIV>
<DIV class=boxclear> &nbsp;</DIV>
<DIV class=boxfooter >
<P>
<!-- start footer -->
<script>footer( 2003)</script>
<!-- end footer -->
</P>
</DIV>
</DIV>
</DIV>

</BODY></HTML>

Thanks,

Rob
Nov 13 '05 #1
1 1902
ch*******@yahoo .com (Rob) wrote in message news:<60******* *************** **@posting.goog le.com>...
Access Gurus,
This script was used to view the reports on the web by choosing a
date on or before the current day.Recently it stopped working and i am
not able to figure where the problem is.
...
I'm not an Access guru but I do have a suggestion. After testing your
functions to make sure they are giving you the output you expect for a
given input, temporarily replace the function calls with a sample
return value. Then keep commenting out logical blocks of code until
you isolate the problem. If it was working before and isn't working
now there may be no way for others to discover the problem since it
may involve something that changed in your environment only. So,
"Break it down."

James A. Fortune
Thanks,

Rob

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1809
by: Flynn | last post by:
My understanding of javascript is very limited. Could some one help me out. I found this code for an image gallery viewer. It works fine on my site, but I'd like to modify it so that the mainpic image is linkable to a popup window displaying the same image only larger. Can this even be done? If so any ideas? Thanks in advance. <HEAD>
2
4758
by: Nasir Wasim | last post by:
How can Access DIV Properties in Script while using Netscape 7.2. I want to use the div id with it's Visibility and left propertyin script but it's not working :-( Main File : ----------- <div id="index" style="position:absolute; width:200px; height:115px; z-index:1; left:-400px; top: 286px visibility:false;">
0
3227
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
1
1672
by: Steve Richter | last post by:
have just installed the Microsoft script debugger for windows 2000: http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en ( notice the "this download is available to customers running genuine Windows Software" message on that page! ) and I am following the instructions here: http://www.devguru.com/features/tutorials/msd/msd_tutorial.html on how to install and use the debugger.
1
1655
by: Q1tum | last post by:
Hi all, I have a problem with my script, I'm using javascript DOM to update my page. The getPortals() function updates a select list whichs shows portals. The doUpdate() function updates a portal and after that it re-builds the select list by calling the getPortals function at the end of the update function. This is working in Opera (without the alert() at the doUpdate()
19
3827
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
2
5143
by: Tereska | last post by:
I want to delete script added before. I'm adding script dynamically and i'm removing later. Why it is still working? I have something like this: <html> <head> <title>JS Script Remove</title> </head>
9
8559
by: whitgurley | last post by:
I've searched the web as well as I can for a solution to this problem but have found nothing and just don't know enough about JavaScript to figure out what's going. What I'm trying to do is convert this script: <a href="#" onclick="MM_goToURL('parent.frames','color2.html');return document.MM_returnValue">TEST</a> ....to something that I can use within a Flash movie, which as far as I can tell means that it needs to reside in the...
9
2403
by: Jerim79 | last post by:
Here it is: <?php if($_SERVER=='POST'){ $Number=$_POST; $Email=$_POST; $Number2=0; $error=0;
3
1845
by: malaysiauser | last post by:
Dear all, Last year I install a download control script in Linux server. its working. This year i'd changed my hosting server to other company. i'd tried install the script. It was installed properly but doesn't work. More about the script; This script will log date, time, ip address, by day, by month, by year and analysis of downloads. It has 4 log files for one module (year, date...) Now the problem is if i create new module, it...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.