VIPStephan
08-11-2008, 02:44 PM
OK, two problems in IE 6 (and in IE 6 only):
I’m using addLoadEvent (http://simonwillison.net/2004/May/26/addLoadEvent/) for my scripts and niceforms (http://www.emblematiq.com/lab/niceforms/) to enhance my form elements. As far as I’ve read addLoadEvent should add a new event without interfering with previously (or later) assigned onload events. This seems to fail in my case and while I could overcome the issue by changing niceforms’ window.onload event to an addLoadEvent function this doesn’t work in IE 6 and I have no idea why.
It does work if I change the order in which the scripts are included in my documents (i. e. if I call niceforms.js before scripts.js). However, I can’t do that because niceforms is a little buggy in that it’s not flexible enough to calculate positions when elements are removed from the DOM or hidden after niceforms has been initalized which I do on http://vipstephan.de/temp/buchfinder.htm, so I have to call scripts.js befaore niceforms.js. What’s the problem and how can I solve it?
The second thing is a minor issue but I also don’t get it. If you examine scripts.js you’ll see that I add a print button to the pages but IE 6 gives me the error: “'text' is undefined”. Why is that? I’ve defined 'text' a few lines above.
Any help is greatly appeciated.
I’m using addLoadEvent (http://simonwillison.net/2004/May/26/addLoadEvent/) for my scripts and niceforms (http://www.emblematiq.com/lab/niceforms/) to enhance my form elements. As far as I’ve read addLoadEvent should add a new event without interfering with previously (or later) assigned onload events. This seems to fail in my case and while I could overcome the issue by changing niceforms’ window.onload event to an addLoadEvent function this doesn’t work in IE 6 and I have no idea why.
It does work if I change the order in which the scripts are included in my documents (i. e. if I call niceforms.js before scripts.js). However, I can’t do that because niceforms is a little buggy in that it’s not flexible enough to calculate positions when elements are removed from the DOM or hidden after niceforms has been initalized which I do on http://vipstephan.de/temp/buchfinder.htm, so I have to call scripts.js befaore niceforms.js. What’s the problem and how can I solve it?
The second thing is a minor issue but I also don’t get it. If you examine scripts.js you’ll see that I add a print button to the pages but IE 6 gives me the error: “'text' is undefined”. Why is that? I’ve defined 'text' a few lines above.
Any help is greatly appeciated.