Maximized Software  Products   Download   Sales   Support   Search   Resellers 

FlashStats
 
New Version!

FlashStats 2006


Product Info

Home Page
What's New
Product FAQ
Reports
Platforms


Get It!

Demo
Download
Pricing Info
Buy It Now
Installation Service


Support

Tech Notes
Support FAQ
Troubleshooting
Online Wizard
Error Codes
Search Engine Definitions
Documentation
Support Form
Email

 

FlashStats

Support: Tech Notes

Tech note FS1457

Description
Can FlashStats automatically select the current date on the Report Request form?

Answer
Yes. However, you will need to edit javascript code on the HTML pages for both the Standard (default names are index.htm, index.html, default.htm or default.html) and the Advanced (advanced.html or advanced.htm) Report Generation forms, located in your /FlasStats/ folder.

1. Open the page to edit in any standard text editor (Notepad, etc.) and locate the following block of code on the page (it will be between the <head> and </head> tags) :

// Relative, or absolute (days)
if (Method <= 1)
{
// start date
StartDate.setTime(StartDate.getTime() + (60*60*24*1000*Offset_Start));
document.FrmMain.sm.selectedIndex = StartDate.getMonth() + 1;
document.FrmMain.sd.selectedIndex = StartDate.getDate() - 1;
document.FrmMain.sy.selectedIndex = StartDate.getFullYear() - 1995;

// end date
EndDate.setTime(EndDate.getTime() + (60*60*24*1000*Offset_End));
document.FrmMain.em.selectedIndex = EndDate.getMonth() + 1;
document.FrmMain.ed.selectedIndex = EndDate.getDate() - 1;
document.FrmMain.ey.selectedIndex = EndDate.getFullYear() - 1995;
}

// Relative month
if (Method == 2)
{
// start date
StartDate.setDate(1);
StartDate.setMonth( StartDate.getMonth() + Offset_Start );
document.FrmMain.sm.selectedIndex = StartDate.getMonth() + 1;
document.FrmMain.sd.selectedIndex = StartDate.getDate() - 1;
document.FrmMain.sy.selectedIndex = StartDate.getFullYear() - 1995;

// end date
EndDate.setDate(1);
EndDate.setMonth( EndDate.getMonth() + Offset_End + 1);
EndDate.setTime(EndDate.getTime() - (60*60*24*1000));
document.FrmMain.em.selectedIndex = EndDate.getMonth() + 1;
document.FrmMain.ed.selectedIndex = EndDate.getDate() - 1;
document.FrmMain.ey.selectedIndex = EndDate.getFullYear() - 1995;
}

// This month so far
if (Method == 3)
{
// start date
StartDate.setDate(1);
document.FrmMain.sm.selectedIndex = StartDate.getMonth() + 1;
document.FrmMain.sd.selectedIndex = StartDate.getDate() - 1;
document.FrmMain.sy.selectedIndex = StartDate.getFullYear() - 1995;

// end date
document.FrmMain.em.selectedIndex = EndDate.getMonth() + 1;
document.FrmMain.ed.selectedIndex = EndDate.getDate() - 1;
document.FrmMain.ey.selectedIndex = EndDate.getFullYear() - 1995;
}

// if start=end, then turn off the "Daily Totals" and "Hits Per Day of Week"
// reports, since they are kinda useless just for one day
ReportsBool = 1
if (document.FrmMain.sm.selectedIndex == document.FrmMain.em.selectedIndex)
if (document.FrmMain.sd.selectedIndex == document.FrmMain.ed.selectedIndex)
if (document.FrmMain.sy.selectedIndex == document.FrmMain.ey.selectedIndex)
{
ReportsBool = 0
}
document.FrmMain.dailytotals.checked = ReportsBool
document.FrmMain.hitsperdayofweek.checked = ReportsBool

} // SelectDates()



function SelectRelativeDates(Offset_Start, Offset_End) {

// start date
ChangeDate = new Date( document.FrmMain.sy.selectedIndex + 1995,
document.FrmMain.sm.selectedIndex - 1,
document.FrmMain.sd.selectedIndex + 1);
ChangeDate.setTime(ChangeDate.getTime() + (60*60*24*1000*Offset_Start));
document.FrmMain.sm.selectedIndex = ChangeDate.getMonth() + 1;
document.FrmMain.sd.selectedIndex = ChangeDate.getDate() - 1;
document.FrmMain.sy.selectedIndex = ChangeDate.getFullYear() - 1995;

// end date
ChangeDate = new Date( document.FrmMain.ey.selectedIndex + 1995,
document.FrmMain.em.selectedIndex - 1,
document.FrmMain.ed.selectedIndex + 1);
ChangeDate.setTime(ChangeDate.getTime() + (60*60*24*1000*Offset_End));
document.FrmMain.em.selectedIndex = ChangeDate.getMonth() + 1;
document.FrmMain.ed.selectedIndex = ChangeDate.getDate() - 1;
document.FrmMain.ey.selectedIndex = ChangeDate.getFullYear() - 1995;

} // SelectRelativeDates()

2. Change each instance of " 1995 " to 1997.

3. Save, close and re-post the pages onto your web server.

The form(s) will now display the current date when loaded into a browser.

For users whose forms do not have 2002 and later years available for selection in the "Days to Analyze" Year field, please see Tech Note 1456.

HomeProductsDownloadsSalesSupportSearchContactPrivacy PolicySite Map

Questions? Contact info@maximized.com
Copyright © 1995-2010 Maximized Software. All rights reserved.