|
| IE6 Crashing on second postback |
 |
Mon, 25 Sep 2006 15:29:34 +000 |
Problem:
I've got a simple ordered list that I'm using as the navigation for an website
I'm working on. I use CSS and a behavior file (Whaterver:hover -
http://www.xs4all.nl/~peterned/csshover.html) to format and provide dropdown
functionality for the menu. When I include the bahavior file in my .CSS IE
crashes when I submit the form more than once. This only seems to be an issue
when enablepartialrendering=true.
I read this post: http://forums.asp.net/thread/1033405.aspx. A couple of the
replies describe similar behavior, but there are no real sollutions posted.
I'm thinking that there is some sort of conflict between the Javascript in the
.htc file I'm importing and the javascript atlas is importing.
Has anyone else has similar experiences? Am I completely off base? Is there a
fix?
Thanks in advance,
Cory
|
| Post Reply
|
| Re: IE6 Crashing on second postback |
 |
Mon, 25 Sep 2006 18:38:54 +000 |
After a bit more investigation i've found that the issue has to lie in one of
the following sections of code. These snippets have been lifted from the
Whatever:hover behavior file. I comented out everything, then started
uncommenting functions until IE started to crash. I think it has to do with the
unhookHoverEvents function, though I can't be sure. I'm unable to get the script
debugger to attach to the browser and step through the script on postback.
var csshoverReg = /(^|\s)((([^a]([^ ]+)?)|(a([^#.][^
]+)+)):(hover|active))|((a|input|textarea)([#.][^ ]+)?:unknown)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
onhover:{on:'onmouseover', off:'onmouseout'},
onactive:{on:'onmousedown', off:'onmouseup'},
onunknown:{on:'onfocus', off:'onblur'}
}
function parseStylesheets() {
if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
window.attachEvent('onunload', unhookHoverEvents);
var sheets = doc.styleSheets, l = sheets.length;
for(var i=0; i<l; i++)
parseStylesheet(sheets[i]);
}
function parseStylesheet(sheet) {
if(sheet.imports) {
try {
var imports = sheet.imports, l = imports.length;
for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
} catch(securityException){}
}
try {
var rules = (currentSheet = sheet).rules, l = rules.length;
for(var j=0; j<l; j++) parseCSSRule(rules[j]);
} catch(securityException){}
}
function hookHoverEvent(node, type, handler) {
node.attachEvent(type, handler);
hoverEvents[hoverEvents.length] = {
node:node, type:type, handler:handler
};
}
function unhookHoverEvents() {
for(var e,i=0; i < hoverEvents.length; i++) {
e = hoverEvents[i];
e.node.detachEvent(e.type, e.handler);
}
Cory
|
| Post Reply
|
| Re: IE6 Crashing on second postback |
 |
Mon, 25 Sep 2006 18:38:57 +000 |
After a bit more investigation i've found that the issue has to lie in one of
the following sections of code. These snippets have been lifted from the
Whatever:hover behavior file. I comented out everything, then started
uncommenting functions until IE started to crash. I think it has to do with the
unhookHoverEvents function, though I can't be sure. I'm unable to get the script
debugger to attach to the browser and step through the script on postback.
var csshoverReg = /(^|\s)((([^a]([^ ]+)?)|(a([^#.][^
]+)+)):(hover|active))|((a|input|textarea)([#.][^ ]+)?:unknown)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
onhover:{on:'onmouseover', off:'onmouseout'},
onactive:{on:'onmousedown', off:'onmouseup'},
onunknown:{on:'onfocus', off:'onblur'}
}
function parseStylesheets() {
if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
window.attachEvent('onunload', unhookHoverEvents);
var sheets = doc.styleSheets, l = sheets.length;
for(var i=0; i<l; i++)
parseStylesheet(sheets[i]);
}
function parseStylesheet(sheet) {
if(sheet.imports) {
try {
var imports = sheet.imports, l = imports.length;
for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
} catch(securityException){}
}
try {
var rules = (currentSheet = sheet).rules, l = rules.length;
for(var j=0; j<l; j++) parseCSSRule(rules[j]);
} catch(securityException){}
}
function hookHoverEvent(node, type, handler) {
node.attachEvent(type, handler);
hoverEvents[hoverEvents.length] = {
node:node, type:type, handler:handler
};
}
function unhookHoverEvents() {
for(var e,i=0; i < hoverEvents.length; i++) {
e = hoverEvents[i];
e.node.detachEvent(e.type, e.handler);
}
Cory
|
| Post Reply
|
|
|