CAUSE
The Commerce Foundation Wizard includes Microsoft JScript code. In JScript version 5.5, the
Date function returns the date in a different format than in previous versions of Jscript.dll. Existing objects that use the
Date function may require the date in the older format, which may cause an error when the new format is received. For example, the
ExpiresAbsolute property of the Active Server Pages (ASP)
Response object is unable to process the new date format that is returned from the
Date function.
This error can be observed on the following line of code, generated by the Commerce Foundation Wizard:
Response.ExpiresAbsolute = new Date(new Date().setYear(1980)).toLocaleString();
WORKAROUND
To work around this problem, modify the following files which contain the ASP code for the Commerce Site Wizard:
02/26/1998 11:06a 2,108 Accept.asp
02/26/1998 11:06a 1,286 Accept_post.asp
02/26/1998 11:06a 5,430 ControlBar.asp
02/26/1998 11:06a 2,406 CopyFinish.asp
02/26/1998 11:06a 13,036 CopyFinish_post.asp
02/26/1998 11:06a 1,934 Default.asp
02/26/1998 11:06a 3,790 Features.asp
02/26/1998 11:06a 1,455 Features_post.asp
08/09/2000 11:01a 0 Fileseffected.txt
02/26/1998 11:06a 2,125 FinControlBar.asp
02/26/1998 11:06a 6,323 Finish.asp
02/26/1998 11:06a 17,343 Finish_post.asp
02/26/1998 11:06a 1,892 Load_wizard.asp
02/26/1998 11:06a 2,921 Locale.asp
02/26/1998 11:06a 5,108 Locale_post.asp
02/26/1998 11:06a 3,937 Merchant.asp
02/26/1998 11:06a 2,028 Merchant_post.asp
02/26/1998 11:06a 3,033 Payment.asp
02/26/1998 11:06a 1,599 Payment_post.asp
02/26/1998 11:06a 9,723 Product.asp
02/26/1998 11:06a 2,675 ProductType.asp
02/26/1998 11:06a 2,661 ProductType_post.asp
02/26/1998 11:06a 2,344 ProductVariable.asp
02/26/1998 11:06a 1,141 ProductVariable_post.asp
02/26/1998 11:06a 1,006 Product_post.asp
02/26/1998 11:06a 5,547 Product_update.asp
02/26/1998 11:06a 5,591 PromoFinish.asp
02/26/1998 11:06a 18,398 PromoFinish_post.asp
02/26/1998 11:06a 2,433 Promos.asp
02/26/1998 11:06a 1,250 Promos_post.asp
02/26/1998 11:06a 6,387 ShippingHandling.asp
02/26/1998 11:06a 5,074 ShippingHandling_post.asp
02/26/1998 11:06a 5,716 Style.asp
02/26/1998 11:06a 3,697 Style_post.asp
02/26/1998 11:06a 17,805 Tax.asp
02/26/1998 11:06a 6,172 Tax_post.asp
02/26/1998 11:06a 1,317 Tax_update.asp
02/26/1998 11:06a 5,296 Template.asp
02/26/1998 11:06a 1,474 Template_Post.asp
02/26/1998 11:06a 1,792 Welcome.asp
02/26/1998 11:06a 2,829 Welcome_error.asp
02/26/1998 11:06a 16,853 Wz_start.asp
To correct the code failure, follow these steps:
- Add the following server-side code to your page:
function ZeroPad(n)
{
if (n < 10)
return "0" + n;
return n;
}
Date.prototype.toUsaString = function()
{
return (ZeroPad(this.getMonth() + 1)) + "/" +
ZeroPad(this.getDate()) + "/" +
ZeroPad(this.getFullYear()) + " " +
ZeroPad(this.getHours()) + ":" +
ZeroPad(this.getMinutes()) + ":" +
ZeroPad(this.getSeconds());
}
- Change the line of code that causes the error from
Response.ExpiresAbsolute = new Date(new Date().setYear(1980)).toLocaleString();
to:
Response.ExpiresAbsolute = new Date(new Date().setYear(1980)).toUsaString();
Note that the
toUsaString function can be modified, if necessary, to reflect different date formatting needs.