From: SourceForge.net <no...@so...> - 2005-07-29 19:41:03
|
Bugs item #769283, was opened at 2003-07-10 12:46 Message generated for change (Comment added) made by doug_melvin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105757&aid=769283&group_id=5757 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DynAPI 3 API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Daniel Tiru (tiru) Assigned to: Nobody/Anonymous (nobody) Summary: Event error Initial Comment: Hi! I have a HTML button and a onclick event assigned to that one. parent.hb = new parent.HTMLButton ('submit','Login','Login'); parent.hb.addEventListener({ onclick:function(e){ var o=e.getSource(); parent.PostData ('frmLogin','response.asp'); } }); When i click on the button one time, it works fine, however when i click another time, it returns: Error: Can't execute code from a freed script Line: 77 in event.js The line in event js looks like this: if (this._listeners[i]["on"+type]) this._listeners[i] ["on"+type](e,args); And my debugger marks this part: this._listeners[i]["on"+type](e,args) The script it calls works fine, i have tried it several times without a HTMLButton, with just an ordinary button. Hope this info helps out in solving this. Regards Daniel ---------------------------------------------------------------------- Comment By: Doug Melvin (doug_melvin) Date: 2005-07-29 12:41 Message: Logged In: YES user_id=184788 how about using the browser's namespace? I.E. top. instead of parent. could be the parent is being reinitialized on reload which is loosing all yer code. top.whatever="blagme" places a vaiable in the top-level window which swill not be erase when reloading the iframe inside that window ---------------------------------------------------------------------- Comment By: Raymond Irving (xwisdom) Date: 2003-07-11 07:28 Message: Logged In: YES user_id=696242 This has to do with your code: onclick:function(e){ var o=e.getSource(); parent.PostData ('frmLogin','response.asp'); This section of the code was created inside the ioelement's Iframe object. Whenever you send another post it will clear the content of the IFrame thus giving the error. The downloaded js code was not created within the scope of the main document but within the scope of the iframe object I've seen it before and I'm thinking of a way to resolve it. -- Raymond Irving ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105757&aid=769283&group_id=5757 |