First of all I wouldn't hit that bug because I don't like the CGI form-field methods. I'm not alone.

But let me give an example of one of those "IE JavaScript bugs" that you mention. And how to work around it.

I was doing some moderately sophisticated JavaScript stuff (couple of form elements interacting with each other) and created closures that referred the page form, and then assigned them as actions on form elements. IE would run slowly, take tons of memory, and then crash. I could not reproduce the problem on Mozilla.

The problem turned out to be that both IE and JavaScript use true memory managers, but different ones. So when cleaning up JavaScript, anything that is referred to by native widgets is not cleaned up. And when cleaning up native widgets, anything that is referred to by JavaScript is not cleaned up. I, of course, had a cycle with native widgets referring to JavaScript that referred back to the form that those widgets were on. Neither memory manager would clean that up, so the page would leak. After some active use, well you see the problem.

The work-around is to never have a variable referred to within a function refer directly to a native form widget. Instead remember widgets by name, and dynamically look them up in the form each and every time. That or convince people to not use Internet Explorer. :-/

In reply to Sometimes You Should Blame The Browser by tilly
in thread Don't Blame The Browser by samtregar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.