Altova Mailing List Archives


Need help on XSL + Javascript

From: "Will Feng" <willfeng88@-------.--->
To: NULL
Date: 3/1/2004 7:06:00 PM
Hi, I am kind of new to XML and XSL.  I am trying to use javascript in XSL
template to
select all checkboxes in the form.  The problem I am facing is that when it
was running the script to select all checkboxes, the browser is freezed for
a couple of minutes and then a
message pops up saying that "The script on this page is causing Internet
Explorer run slowly.  If it continues to run, your computer may become
unresponsive.  Do you want to abort the script?".  But the same script runs
fine in HTML page.  I approciated if any one can help.  Thanks.

My script code is pasted below if you need it.  helps are appreciated.
Thanks a million.

Will Feng
----------------------------------------------------------------------------
-----------
<script type="text/javascript" language="javascript">
    function SelectAll() {
         if (document.Results.chkAll.checked) {
             CheckAll();
         }
         else {
             ClearAll();
         }
    }

    function Check(e) {
         e.checked = true;
    }

    function Clear(e) {
         e.checked = false;
    }

    function CheckAll() {
         var ml = document.Results;
         var len = ml.elements.length;
         for (var i = 0; i < len; i++) {
             var e = ml.elements[i];
             if (e.name == "Mid") {
              Check(e);
              }
         }
    }
    function ClearAll()  {
         var ml = document.Results;
         var len = ml.elements.length;
         for (var i = 0; i < len; i++) {
             var e = ml.elements[i];
             if (e.name == "Mid") {
             Clear(e);
             }
         }
    }
</script>



Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.