在我的 ASP CMS 中找不到此错误的原因
我刚刚找到了我所见过的最奇怪的错误之一的解决方案,并且我仍在努力寻找原因......
我在经典 ASP 中得到了一个旧的 CMS。在编辑器页面中,有一个 JavaScript 更改了图像属性:
function removeimg(objimg){
objimg.onclick = "";
objimg.src = "/Logiciel/_Altitude_image/interface/Gestion_acces/spacer.gif";
objimg.width = 16;
objimg.style.cursor = "arrow";
}
我的一位使用 IE6 的客户告诉我,当她用英语保存内容时,会用法语覆盖她的内容,但语言保存在经典 ASP 会话中,所以我开始为了调查这个错误(我的 200 个其他客户都没有遇到这种问题),所以在一遍又一遍地测试后,将response.end放入我的会话的代码和response.write中,以找出它发生变化的地方,我发现它在 javascript 本身中
这是我无法解释的部分...我必须将 objimg.style.cursor = "arrow"
;起初在评论中意识到,一旦该行退出,我的 ASP 会话就不再有问题了。
然后经过几次测试后,我将 objimg.style.cursor = "arrow";
更改为 objimg.style.cursor = "pointer";
并且效果很好。我想知道之前是否有人遇到过此类问题,是否有人可以向我解释更改光标如何影响我的服务器端经典 ASP 会话,
谢谢。
I just found a solution to one of the weirdest bug i have ever seen and i am still trying to find the reason ...
I got an old CMS in Classic ASP. In the editor page there's 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 clients 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 tests 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 IE 中的一个错误:当脚本为
finds赋予cursor
属性一个无效值(例如arrow
)时(尽管不是CSS 中)它错误地将其视为url(arrow)
并尝试获取它认为应该显示的名为“arrow”的图像文件。这个额外的 HTTP 请求将发送与发出该请求的页面关联的所有 cookie。这些 cookie 将包括 ASP 会话标识符 cookie,并且可能这种意外且无序的请求在某种程度上影响了与会话相关的代码。(顺便说一句,如果光标应该是通常的箭头光标,则正确的值为
default
;pointer
是与悬停在链接上相关的光标。但也许这就是最初想要的。)It's a bug in IE: when it
findsis given an invalid value, such asarrow
, for thecursor
property by a script (though not in CSS) it incorrectly treats it as if it wereurl(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.)