views:

103

answers:

1

i just found a solution to one of the wierdest bug i have ever seen and i am still trying to find the reason ...

i got a old CMs in Classic ASP. in the editor page theres a javascript changing an image property

function removeimg(objimg){
    objimg.onclick = "";
    objimg.src = "/Logiciel/_Altitude_image/interface/Gestion_acces/spacer.gif";
    objimg.width = 16;
    objimg.style.cursor = "arrow";
}

one of my client using IE6 told me that when she was saving her content in english it was overwriting her content in french but the Language is saved in a Classic asp session so i started to investigate the bug (none of my 200 other client got that kind of problem) so after testing over and over again putting response.end in the code and response.write of my session to find out where it was changing i found out that it was in the javascript itself

this is the part i cant explain ... i had to put objimg.style.cursor = "arrow"; in comment at first to realize that once that line was out there was no more problem with my asp session.

then after a few test i changed objimg.style.cursor = "arrow"; to objimg.style.cursor = "pointer";

and it worked just fine ... i was wondering if anyone got that kind of problem before ... and if someone could explain to me how changing a cursor could affect my server side classic asp session

thank you

+6  A: 

It's a bug in IE: when it finds is given an invalid value, such as arrow, for the cursor property by a script (though not in CSS) it incorrectly treats it as if it were url(arrow) and attempts to fetch the image file named "arrow" that it believes it should be displaying. This additional HTTP request would send any cookies associated with the page from which it was made. The cookies would include the ASP Session identifier cookie, and presumably this unexpected and out-of-sequence request was somehow affecting your session-related code.

(By the way, if the cursor is supposed to be the usual arrow cursor, the correct value is default; pointer is the cursor associated with hovering over a link. But perhaps that's what was wanted in the first place.)

NickFitz
Source for the IE bug?
Crescent Fresh
@crescentfresh: unfortunately I can't remember now :-(
NickFitz
@cresecentfresh (again): I've just confirmed this with a quick test. It only happens when the style.cursor property is set by script, not in CSS. As I'm on a client site I can't post the demo, but I'll see if I can get time to write it up and post it on my blog later (or more likely, at the weekend) :-)
NickFitz
i tested myself and it seems to be the problem thx again for the quick answer
Lil'Monkey
+1. Nice little bug that one. :)
AnthonyWJones