Focal Point
[SOLVED] Displaying default input dates in Firefox browser

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1547079776

August 21, 2015, 02:58 PM
EMK
[SOLVED] Displaying default input dates in Firefox browser
We call up our reports with ASP pages which allow the user to enter the dates selected, and when first called up, the screen is populated with default dates (for example, from the beginning of the year to yesterday). When the screen is called up in an Internet Explorer 8 browser, the dates display correctly, but when it is called up in a Firefox 30.0 browser, the dates do not display the year correctly. Instead of 2015, it displays as 115. Has anyone else ever come across this?

Thanks,
Eileen

This message has been edited. Last edited by: <Kathryn Henning>,
August 31, 2015, 10:29 AM
Tamra
Hello EMK,

Welcome to Focal Point.

This is a friendly follow-up to your question about the displaying of the dates in Firefox.

On the IBI TechSupport site there is a link under Self-Service - Release and Compatibility - this will provide you with the browser version compatible with your version of WebFOCUS.

If you can please update your profile so that we can see which version of WebFOCUS you are running then we can provide better assistance.

Once you click on the link above ....
- click on WebFOCUS
- click on Browsers
- click on your version of WebFOCUS

For instance WebFOCUS 8.0.09 - supports Firefox v38

I hope the link helps you out.

Thank you for participating in the Focal Point Forum.

Kindest regards,
Tamra Colangelo
Focal Point Moderator
Information Builders Inc.


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
September 15, 2015, 01:59 PM
EMK
Hello Tamra,

Thank you for your kind response to my post. I am sorry that I did not see it until today.

We are using WebFOCUS version 7.6.2. We contacted IBI Info-Response Online, and they found that Firefox 30.0 was not supported for our WebFOCUS version.

Since Firefox was not correctly displaying the year with the logic we were using, I tried hard-coding the first two digits of the four-digit year.

In the .asp Javascript coding, the year is populated this way:

var thisyear = (x.getYear() );


I added the following three statements immediately after that statement to substitute ‘20’ for the first two digits of the variable ‘thisyear’ if the first two digits are not already ‘20’:

var thisyr2 = thisyear.toString().substr(1,2);
var testyr = thisyear.toString().substr(0,2);
if (testyr != 20) thisyear = "20" + thisyr2;

I found that it is necessary to test before substituting the digits, because in Internet Explorer, the year is ‘2015’, so the substr(1,2) is ‘01’ and in Firefox, the year is ‘115’, so the substr(1,2) is ‘15’. (Because in Javascript the first digit is substr(0,1), the second digit is substr(1,1), etc.) Since the substring will not be the same in Internet Explorer than in Firefox, I make the changes only if the year does not already begin with ‘20’, so no change is made if the screen is being displayed in Internet Explorer.

With these two statements added, the screen displays the year correctly in Firefox as ‘2015’ rather than as ‘115’.

Thank you and best wishes,
Eileen Lonce