Hi,
I'm coding a shopping cart in asp. I store all info about ordered items,
customer's coordonates, etc...into cookies.
When the order is complete I use "CDONTS.NewMail " to send an order
confirmation's email, where all items and details are listed for the
customer.
As to retreive all these info a code reads all info stored in the cookies.
If a run my code under Firefox and Konqeror , all works well and the sent
email contains all info. But not under i.e!!!
So, I wrote a code to read all cookies on the page before opening the page
that generates the email to the customer, then when tested, all the cookies
and session variables can be read.
Under i.e., if the same code is run in the page generating the email, it
returns empty session variables and some cookies are missing or are now
empty or can't be read!!!
If it is tested under Firefox and Konqeror all cookies and session variable
are stil there!
Can someone help me?
Thank you. 7 1637
On Sat, 28 May 2005 16:58:04 GMT, patbaudy <pa******@hotma il.com> wrote:
in <Xn************ *************** *****@205.237.2 33.52> Hi, I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc...into cookies. When the order is complete I use "CDONTS.NewMail " to send an order confirmation 's email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies. If a run my code under Firefox and Konqeror , all works well and the sent email contains all info. But not under i.e!!!
So, I wrote a code to read all cookies on the page before opening the page that generates the email to the customer, then when tested, all the cookies and session variables can be read. Under i.e., if the same code is run in the page generating the email, it returns empty session variables and some cookies are missing or are now empty or can't be read!!! If it is tested under Firefox and Konqeror all cookies and session variable are stil there!
Can someone help me? Thank you.
This is probably more of a client side issue than an ASP issue and more
than likely not the cause of your specific problem but I'll throw this
out anyway. If you're doing anything with the year in computing your
expiration date for the cookies, the javascript getYear function returns
different values in Firefox than in IE. In Firefox you need to add 1900
to the value but not in IE. I believe that this is another case where
IE does not follow the spec and Firefox does.
var today=new Date();
var year=today.getY ear()+1;
if(year<200) {year+=1900}
var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ;
SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate);
---
Stefan Berglund
"Stefan Berglund" <ke****@in.theg roups> wrote in message
news:55******** *************** *********@4ax.c om... On Sat, 28 May 2005 16:58:04 GMT, patbaudy <pa******@hotma il.com> wrote: in <Xn************ *************** *****@205.237.2 33.52>
Hi, I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc...into cookies. When the order is complete I use "CDONTS.NewMail " to send an order confirmation' s email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies. If a run my code under Firefox and Konqeror , all works well and the sent email contains all info. But not under i.e!!!
So, I wrote a code to read all cookies on the page before opening the page that generates the email to the customer, then when tested, all the cookies and session variables can be read. Under i.e., if the same code is run in the page generating the email, it returns empty session variables and some cookies are missing or are now empty or can't be read!!! If it is tested under Firefox and Konqeror all cookies and session variable are stil there!
Can someone help me? Thank you. This is probably more of a client side issue than an ASP issue and more than likely not the cause of your specific problem but I'll throw this out anyway. If you're doing anything with the year in computing your expiration date for the cookies, the javascript getYear function returns different values in Firefox than in IE. In Firefox you need to add 1900 to the value but not in IE. I believe that this is another case where IE does not follow the spec and Firefox does.
The getFullYear() function is supported uniformly by all of them, iirc, it's
the ECMA answer to the problem. Personally I have to wonder whether the
ECMA folks that decided this weren't gathering wild mushrooms without good
field guide! What on earth was their incentive to proliferate Y2K-style
issues. It'd likely be worth the minor amount of code the change would
break, just to be rid of it....
var today=new Date(); var year=today.getY ear()+1; if(year<200) {year+=1900} var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ; SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate);
Shouldn't the test be if (year < 1900)? Since 2-digit years arbitrarily
impute 1900 as the base -- and it's extremely unlikely that base will ever
change -- code that test year < 200 will cause problems in only 95 years.
Now you may be thinking, if they're still running this same code in 95
years, 2100 will be a sad year for IT... In other words, chances are poor it
would ever be an issue -- I tend to agree, however, that's exactly what they
were thinking in the 70's an 80's! History proved otherwise.
So the point is, why code something inaccurately, and in a way that has a
difinitively short-term finite life span, when it would be just as easy to
code it accurately?
-Mark
--- Stefan Berglund
On Sat, 28 May 2005 12:09:07 -0700, "Mark J. McGinty"
<mm******@spamf romyou.com> wrote:
in <#D************ **@TK2MSFTNGP12 .phx.gbl> "Stefan Berglund" <ke****@in.theg roups> wrote in message news:55******* *************** **********@4ax. com... On Sat, 28 May 2005 16:58:04 GMT, patbaudy <pa******@hotma il.com> wrote: in <Xn************ *************** *****@205.237.2 33.52>
Hi, I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc...into cookies. When the order is complete I use "CDONTS.NewMail " to send an order confirmation 's email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies. If a run my code under Firefox and Konqeror , all works well and the sent email contains all info. But not under i.e!!!
So, I wrote a code to read all cookies on the page before opening the page that generates the email to the customer, then when tested, all the cookies and session variables can be read. Under i.e., if the same code is run in the page generating the email, it returns empty session variables and some cookies are missing or are now empty or can't be read!!! If it is tested under Firefox and Konqeror all cookies and session variable are stil there!
Can someone help me? Thank you.
This is probably more of a client side issue than an ASP issue and more than likely not the cause of your specific problem but I'll throw this out anyway. If you're doing anything with the year in computing your expiration date for the cookies, the javascript getYear function returns different values in Firefox than in IE. In Firefox you need to add 1900 to the value but not in IE. I believe that this is another case where IE does not follow the spec and Firefox does.
The getFullYear() function is supported uniformly by all of them, iirc, it's the ECMA answer to the problem. Personally I have to wonder whether the ECMA folks that decided this weren't gathering wild mushrooms without good field guide! What on earth was their incentive to proliferate Y2K-style issues. It'd likely be worth the minor amount of code the change would break, just to be rid of it....
var today=new Date(); var year=today.getY ear()+1; if(year<200) {year+=1900} var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ; SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate);
Shouldn't the test be if (year < 1900)? Since 2-digit years arbitrarily impute 1900 as the base -- and it's extremely unlikely that base will ever change -- code that test year < 200 will cause problems in only 95 years.
Now you may be thinking, if they're still running this same code in 95 years, 2100 will be a sad year for IT... In other words, chances are poor it would ever be an issue -- I tend to agree, however, that's exactly what they were thinking in the 70's an 80's! History proved otherwise.
So the point is, why code something inaccurately, and in a way that has a difinitively short-term finite life span, when it would be just as easy to code it accurately?
-Mark
Hey Mark,
Well, I can't argue with such a direct answer other than to say that why
don't you try the code in both browsers and then offer your solution.
Apparently, you've missed the issue here since it has nothing to do with
the Y2K issue and only to do with how the two javascript runtimes behave
with respect to the specified function (getYear).
And actually I do have a correction to make since I want my cookie to
expire on the last day of next year (effectively permanent if used each
year):
var today=new Date();
var year=today.getY ear();
if(year<200) {year+=1900}
year+=1;
var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ;
SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate);
---
Stefan Berglund
"patbaudy" <pa******@hotma il.com> wrote in message
news:Xn******** *************** *********@205.2 37.233.52... Hi, I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc...into cookies. When the order is complete I use "CDONTS.NewMail " to send an order confirmation's email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies. If a run my code under Firefox and Konqeror , all works well and the sent email contains all info. But not under i.e!!!
So, I wrote a code to read all cookies on the page before opening the page that generates the email to the customer, then when tested, all the cookies and session variables can be read. Under i.e., if the same code is run in the page generating the email, it returns empty session variables and some cookies are missing or are now
Make sure cookies are enabled in your browser - Tools, Internet Options,
Privacy, Advanced, check the box "Always allow session cookies"
--
John Blessing http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web. http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
"Stefan Berglund" <ke****@in.theg roups> wrote in message
news:2q******** *************** *********@4ax.c om... On Sat, 28 May 2005 12:09:07 -0700, "Mark J. McGinty" <mm******@spamf romyou.com> wrote: in <#D************ **@TK2MSFTNGP12 .phx.gbl>
"Stefan Berglund" <ke****@in.theg roups> wrote in message news:55****** *************** ***********@4ax .com... On Sat, 28 May 2005 16:58:04 GMT, patbaudy <pa******@hotma il.com> wrote: in <Xn************ *************** *****@205.237.2 33.52>
[snip] var today=new Date(); var year=today.getY ear()+1; if(year<200) {year+=1900} var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ; SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate); Shouldn't the test be if (year < 1900)? Since 2-digit years arbitrarily impute 1900 as the base -- and it's extremely unlikely that base will ever change -- code that test year < 200 will cause problems in only 95 years.
Now you may be thinking, if they're still running this same code in 95 years, 2100 will be a sad year for IT... In other words, chances are poor it would ever be an issue -- I tend to agree, however, that's exactly what they were thinking in the 70's an 80's! History proved otherwise.
So the point is, why code something inaccurately, and in a way that has a difinitivel y short-term finite life span, when it would be just as easy to code it accurately?
-Mark
Hey Mark,
Well, I can't argue with such a direct answer other than to say that why don't you try the code in both browsers and then offer your solution.
Oddly enough, I have tried the code, in at least 4 browsers (IE, Opera,
Firefox and Netscape.) It works because the underlying logic is sound. Do
you have an argument or test case to refute this?
Apparently, you've missed the issue here since it has nothing to do with the Y2K issue and only to do with how the two javascript runtimes behave with respect to the specified function (getYear).
I didn't say *the* Y2K issue, I said "Y2K-style" issue, but obviously that
reference was too obscure, so to define, what I meant by that was a type of
software problem caused by code that makes false assumptions based on
2-digit year values, that will predictably fail after a given date.
Your code will predictably fail as of 01 January 2100, because the
assumptions that underlie your test of (yr < 200) are inaccurate, the value
200 is arbitrary and meaningless, it merely happens to work right now
because it's sufficiently high. Logically, that will not always be the
case.
The question in my mind was and is, why would someone choose to write code
like that? At least the desogners of ancient languages like COBOL and
FORTRAN had a compelling reason for their choice, 1KB of memory had to be
wheeled-in on a hand-truck. Even though that reason is very long gone,
implementations of that choice, and throw-backs thereto, persist to this
day.
But there's a difference here, getYear doesn't return a 2-digit year, it
returns the current year minus 1900, it actually does return complete data,
it's just in a denormal form. Early computer systems literally lacked part
of the data, their choices were limited, yours are not... so what's *your*
reason?
And I didn't miss the issue at all, I was merely pointing out that your
solution was flawed... and I see that it will continue to be flawed, by your
'correction' below -- very scientiffic approach, by all means stick with it,
what consequences could there possibly be? (Those who do not learn from
history are destined to repeat it.)
-Mark
And actually I do have a correction to make since I want my cookie to expire on the last day of next year (effectively permanent if used each year):
var today=new Date(); var year=today.getY ear(); if(year<200) {year+=1900} year+=1; var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ; SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate);
--- Stefan Berglund
On Sun, 29 May 2005 12:35:53 -0700, "Mark J. McGinty"
<mm******@spamf romyou.com> wrote:
in <jPome.1210$4p. 1148@fed1read03 > "Stefan Berglund" <ke****@in.theg roups> wrote in message news:2q******* *************** **********@4ax. com... On Sat, 28 May 2005 12:09:07 -0700, "Mark J. McGinty" <mm******@spamf romyou.com> wrote: in <#D************ **@TK2MSFTNGP12 .phx.gbl>
"Stefan Berglund" <ke****@in.theg roups> wrote in message news:55***** *************** ************@4a x.com... On Sat, 28 May 2005 16:58:04 GMT, patbaudy <pa******@hotma il.com> wrote: in <Xn************ *************** *****@205.237.2 33.52> [snip] var today=new Date(); var year=today.getY ear()+1; if(year<200) {year+=1900} var expiryDate=new Date("December 31, " + year.toString() + "23:59:59") ; SetCookie(escap e(document.Show Schedule.BillIn fo.value),sDeta il,expiryDate);
Shouldn't the test be if (year < 1900)? Since 2-digit years arbitrarily impute 1900 as the base -- and it's extremely unlikely that base will ever change -- code that test year < 200 will cause problems in only 95 years.
Now you may be thinking, if they're still running this same code in 95 years, 2100 will be a sad year for IT... In other words, chances are poor it would ever be an issue -- I tend to agree, however, that's exactly what they were thinking in the 70's an 80's! History proved otherwise.
So the point is, why code something inaccurately, and in a way that has a difinitive ly short-term finite life span, when it would be just as easy to code it accurately?
-Mark
Hey Mark,
Well, I can't argue with such a direct answer other than to say that why don't you try the code in both browsers and then offer your solution.
Oddly enough, I have tried the code, in at least 4 browsers (IE, Opera, Firefox and Netscape.) It works because the underlying logic is sound. Do you have an argument or test case to refute this?
Apparently, you've missed the issue here since it has nothing to do with the Y2K issue and only to do with how the two javascript runtimes behave with respect to the specified function (getYear).
I didn't say *the* Y2K issue, I said "Y2K-style" issue, but obviously that reference was too obscure, so to define, what I meant by that was a type of software problem caused by code that makes false assumptions based on 2-digit year values, that will predictably fail after a given date.
Your code will predictably fail as of 01 January 2100, because the assumptions that underlie your test of (yr < 200) are inaccurate, the value 200 is arbitrary and meaningless, it merely happens to work right now because it's sufficiently high. Logically, that will not always be the case.
The question in my mind was and is, why would someone choose to write code like that? At least the desogners of ancient languages like COBOL and FORTRAN had a compelling reason for their choice, 1KB of memory had to be wheeled-in on a hand-truck. Even though that reason is very long gone, implementation s of that choice, and throw-backs thereto, persist to this day.
But there's a difference here, getYear doesn't return a 2-digit year, it returns the current year minus 1900, it actually does return complete data, it's just in a denormal form. Early computer systems literally lacked part of the data, their choices were limited, yours are not... so what's *your* reason?
And I didn't miss the issue at all, I was merely pointing out that your solution was flawed... and I see that it will continue to be flawed, by your 'correction' below -- very scientiffic approach, by all means stick with it, what consequences could there possibly be? (Those who do not learn from history are destined to repeat it.)
-Mark
<contrition><mi ld>
My apologies since the tone of my previous reply set the tone for yours.
The getFullYear function works as I would expect it to and I'll make use
of it henceforth.
Frankly though since I refactor my entire site every 18-24 months, I'm
less than concerned about the code failing in 95 years. And I assure
you that MS will make sure the code doesn't work as it does now long
before then. :-)
Thank you for the correction. In this case I could have posted the
problem to a scripting group and probably would have been pointed to the
getFullYear function, but under the crunch to get it working I chose the
expedient hack. And now I've been informed, which is why I read through
these posts.
</mild></contrition>
My spell checker just tried to changed getFullYear to fretfully.
---
Stefan Berglund
Such a simple solution :op but possibly the better one to try first! Also
you didn't get into a flame match by suggestion ;o) lol
WELL DONE!
--
Jon wa*********@gma il.com
Look at that dead pixel on your screen! *SLAP* Gotcha!
"John Blessing" <jb@**REMOVE**T HIS**Lbesoftwar e.com> wrote in message
news:8l******** *******@newsfe1-gui.ntli.net... "patbaudy" <pa******@hotma il.com> wrote in message news:Xn******** *************** *********@205.2 37.233.52... Hi, I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc...into cookies. When the order is complete I use "CDONTS.NewMail " to send an order confirmation's email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies. If a run my code under Firefox and Konqeror , all works well and the sent email contains all info. But not under i.e!!!
So, I wrote a code to read all cookies on the page before opening the page that generates the email to the customer, then when tested, all the cookies and session variables can be read. Under i.e., if the same code is run in the page generating the email, it returns empty session variables and some cookies are missing or are now
Make sure cookies are enabled in your browser - Tools, Internet Options, Privacy, Advanced, check the box "Always allow session cookies"
-- John Blessing
http://www.LbeHelpdesk.com - Help Desk software priced to suit all businesses http://www.room-booking-software.com - Schedule rooms & equipment bookings for your meeting/class over the web. http://www.lbetoolbox.com - Remove Duplicates from MS Outlook This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Adrian B. |
last post by:
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?
Thanks.
A.B.
|
by: dumblede |
last post by:
Hello fellows,
i would like to center a 800px wide 600px high content area
without using frames. I have "come up" with the following
solution so far. It works under IE 6.0, Firefox 1 (under Windows
and Linux) but not under Konqueror (could not test Safari, but
they have the rendering engine in common (see www.kde.org)):
<pre>
|
by: VNG |
last post by:
I have an ANSI C program that was compiled under Windows MSVC++ 6.0 (SP6) and
under Linux gnu, and ran under P3, P4 and AMD.
It runs fine on P3 and AMD under both Windows and Linux, but under P4 it has
problems. Under Windows 3GHz P4 runs twice slower than 800MHz P3... and under
Linux not only that it runs slower (while AMD is 40 times faster), but it also
produces wrong numerical results...
Any suggestion what can be the problem?
|
by: Andrew Poulos |
last post by:
The web pages that I've been building under Windows and which validate
and display without error or problem with IE, MZ and FF are problematic
under Linux - Fedora Core 3.
I have a 512K ADSL connection and with FF the pages display promptly but
if I click a link MZ closes all open windows without warning (it
crashes.) With Koqueror the pages each take about 5 minutes to display
though typically a page is under 10K.
How do I start...
|
by: Christopher |
last post by:
One of our ASP.NET Pages is starting a new Process using the Process object.
When the process starts, it is started under the ASPNET User. We tried
editing the web.config file and the machine.config to operate under other
user accounts but our dynamically started process still starts under ASPNET.
How do you programatically start a process under a specific Windows User
Account? Thanks so much!
Christopher
| |
by: cdlipfert |
last post by:
Our intranet is running under windows integrated security. We have
domain users that want to access our intranet site via ssl vpn. SSL
VPN can not authenticate against services that run under windows
integrated security. In order to get around this issue it seems that we
would need to create a login page on a separate site that runs under
anonymous security. Then pass the users credentials to the site
running under integrated security. ...
|
by: Adam |
last post by:
On an xp machine, the caching works as expected. I have deployed to a win2k
server, and an item I add to the cache expires almost immediately some times
and in under a minute in other times. The aspnet_wp process is not restarting
during this time, and there are no other requests, so nothing should be
clearing this out. I have added a CacheItemRemovedCallback which writes debug
info out to a DefaultTraceListener, but no output shows up on...
|
by: Philip Wagenaar |
last post by:
Framework 1.1
I want to start AcrobatReader to print a printjob under a specific username
(so that the owner of the printjob is not the username of the application
that the .net application runs under).
So how can I start a process under another user? The password of the user is
known. (I already have code to create user if needed)
If this can be done easier in Framework 2.0 I can switch to that, but it
|
by: rogersw8n |
last post by:
Some how, some way the account that creates folders under Temporary
Internet files has been changed to a domain account for VS 2003 and VS
2005. I recently installed VS 2005. All seemed to be ok afterwards.
I did no development for a couple of weeks, came back and I kept
receiving Access Denied to Microsoft.Net\Temporary Internet Files\...
Access is Denied. ASPNET had full access to that file and all
subfolders. The website I am...
|
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...
|
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,...
| |
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...
|
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,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |