Yes. It worked after all. My fault. I put your code in the wrong 
file. Your code even seemed to solve another problem which i had:

The IE just terminated when typing text in the textbox (this is an 
SVG text editor) and hoovering the text at the same time. This time 
just treminating with no error message at all.

Again, thanks alot! :)


--- In svg-developers@yahoogroups.com, "skrellkolja" <[EMAIL PROTECTED]> 
wrote:
> 
> Thanks alot for your effort higorion, but unfortunately this 
didn't 
> help at all.
> 
> I replaced the addEventListeners as yot told me to and pasted your 
> code, but I got just the same error as before. I removed all 
> listeners, and that seemed to stop IE from crashing, so it seems 
> clear that it's the events that are causing the trouble.
> I tried to put an alert at the top of your exit() function, but 
> never got an alert on refresh, so the browser seems to crash 
before 
> even running the exit() function.
> Hmmmm.
> 
> 
> SkrellK
> 
> 
> --- In svg-developers@yahoogroups.com, "higorion" <[EMAIL PROTECTED]> 
> wrote:
> > 
> > Hi,
> > 
> > sounds like a problem with cleaning up events at page unload.
> > 
> > this has been discussed as a problem only apparent in the 
> combination 
> > of internet explorer and svg viewer and can be avoided by using 
> > something like:
> > 
> > function init(evt) {
> >  if ( window.parent != null ) parent.onbeforeunload = exit;
> > }
> > function exit(evt) {
> >  for (i=0; i<registeredEvents.length; i++) {
> >   registeredEvents[i].removeListener();
> >  }
> > }
> > 
> > of course, to do so, you have to write some code to gather all 
> > registered events in the array that gets iterated through in 
> the "exit" 
> > function. personally, i use something like:
> > 
> > var registeredEvents = new Array();
> > function RegisteredEvent(argTarget,argType,argHandler) {
> >     this.target = argTarget;
> >     this.type = argType;
> >     this.handler = argHandler;
> >     this.addListener();
> > }
> > RegisteredEvent.prototype.addListener = function() {
> >     this.target.addEventListener(this.type,this.handler,false);
> > };
> > RegisteredEvent.prototype.removeListener = function() {
> >     this.target.removeEventListener
> (this.type,this.handler,false);
> > };
> > function registerEvent(argTarget,argType,argHandler) {
> >     registeredEvents[registeredEvents.length] = new 
> RegisteredEvent
> > (argTarget,argType,argHandler);
> > }
> > function unregisterEvent(argTarget,argType,argHandler) {
> >     temp = new Array();
> >     for (i=0; i<registeredEvents.length; i++) {
> >             if (registeredEvents[i].target != argTarget || 
> > registeredEvents[i].type != argType || registeredEvents
> [i].handler != 
> > argHandler) {
> >                     temp[temp.length] = registeredEvents[i];
> >             }
> >             else {
> >                     registeredEvents[i].removeListener();
> >             }
> >     }
> >     registeredEvents = temp;
> > }
> > 
> > finally, replace all occurences of "object.addEventListener
> > (type,handler,false);" with "registerEvent(object,type,handler)" 
> and 
> > your events will be cleaned up before your page unloads.
> > 
> > cheers,
> > 
> > hannes
> > 
> > --- In svg-developers@yahoogroups.com, "skrellkolja" 
> <[EMAIL PROTECTED]> 
> > wrote:
> > > 
> > > Hi.
> > > Anyone familiar to this problem?
> > > It's an SVG application supported by javascript. When i pres 
> refresh 
> > > in the browser it just terminates, and the standard "Do you 
want 
> to 
> > > report error"-window appears. Sometimes refreshing works fine, 
> but 
> > > then it suddenly starts crashing.
> > > 
> > > Anyone who knows where to start seeking for errors?
> > > 
> > > Thanx alot!





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to