Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Bizarre IE behaviour.
- From: allard-schripsema at procergs.rs.gov.br (Allard Schripsema)
- Subject: [Javascript] Bizarre IE behaviour.
- Date: Thu Aug 12 11:49:37 2004
Hi your problem reproduced here replacing var intDay = parseInt (strDay); for var intDay = strDay-1+1; works though.... seems to be a bug, doesn?t it.... -----Original Message----- From: javascript-bounces@xxxxxxxxxx [mailto:javascript-bounces@xxxxxxxxxx]On Behalf Of Laurent Muchacho Sent: Thursday, August 12, 2004 1:31 PM To: '[JavaScript List]' Subject: RE: [Javascript] Bizarre IE behaviour. Hi No you not going mad I got the same behaviour it also behave the same in firefox if you want to convert this value to number then I will recommend to use Number(strDay) Laurent -----Original Message----- From: Matt Barton [mailto:javascript@xxxxxxxxxxxxxx] Sent: 12 August 2004 17:22 To: [JavaScript List] Subject: [Javascript] Bizarre IE behaviour. This is probably me being fantastically short sighted, but I've noticed behaviour in IE this afternoon which was wholey unexpected, and also plain wrong ("so tell us something new", say the open source fraternity). This is the situation. I have a very simple page: ---------------------------- <html> <body> <script> var strDay = '09'; var strMonth = '06'; var strYear = '2004'; alert (strDay); alert (strMonth); alert (strYear); var intDay = parseInt (strDay); var intMonth = parseInt (strMonth); var intYear = parseInt (strYear); alert (intDay); alert (intMonth); alert (intYear); </script> </body> </html> -------------------- When it loads I would expect to see six consecutive alert boxes containing, in order, the following strings: "09", "06", "2004", "9", "6", "2004". However, in IE6/Win (on two separate machines in my office) the fourth alert box contains "0". Does anyone else see this behaviour? Tell me I'm not going mad ... Oh - I've tested it on Opera (the only other browser I have immediate access to without installing another) and it works exactly as I would expect it to. Matt _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript This E-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this E-mail. _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] Bizarre IE behaviour.
- From: Laurent Muchacho
- [Javascript] Bizarre IE behaviour.
- Prev by Date: [Javascript] Bizarre IE behaviour.
- Next by Date: [Javascript] Thanks & follow-up,
- Previous by thread: [Javascript] Bizarre IE behaviour.
- Next by thread: [Javascript] code: disable & re-enable button
- Index(es):