?
Solved

mouseover - max cpu

Posted on 2006-05-25
7
Medium Priority
?
340 Views
Last Modified: 2010-08-05
I have a couple of web pages that have a fair amount of javascripting. When I mouseover text labels or checkboxes, the client-side cpu goes very high, almost to 100%, and stays there until you mouse-off the label or checkbox. The strange thing is, there are no onmouseover or onmouseout anywhere. I'm using IE7 B2, but the same symptom happens on IE6. What could be causing this?

One of my pages that exhibits this symptom:


<HTML>
<HEAD>
      
      <TITLE>My Page</TITLE>
      <LINK REL="stylesheet" HREF="Custom/Style.css" type="text/css">
      <SCRIPT LANGUAGE="JavaScript" SRC="./Integration/TranslationWYSIWYG/common.js"></SCRIPT>
      <SCRIPT LANGUAGE="JavaScript" SRC="JavaScripts.js"></SCRIPT>
</HEAD>

<BODY BGCOLOR="#FFFFFF" onLoad="expandTree(foldersTree)" onScroll="top.PermsRight.scrollTo(0,document.body.scrollTop)">


<!-- Infrastructure code for the treeview -->
<script src="TreeView_Permissions.js"></script>

<script>
      ROWCOLOR = ""
      USETEXTLINKS = 1
      STARTALLOPEN = 0
      PERSERVESTATE = 0 //don't preserve state of tree when coming from View Projects
      ICONPATH = 'images/'

      foldersTree = gFld("Experts Exchange Test Project", "","","","","","")
f = foldersTree
f.xID = 0
fSub = insFld(f,gFld("Drawings","","#EDEBF1","","","",""))
fSub.xID = 116
fSubSub = insFld(fSub,gFld("Plumbing","","#FFFFFF","","","",""))
fSubSub.xID = 119
fSubSub = insFld(fSub,gFld("Electrical","","#EDEBF1","","","",""))
fSubSub.xID = 120
fSubSub = insFld(fSub,gFld("Machinary","","#FFFFFF","","","",""))
fSubSub.xID = 121
fSubSub = insFld(fSub,gFld("Structual","","#EDEBF1","","","",""))
fSubSub.xID = 122
fSub = insFld(f,gFld("Documents","","#FFFFFF","","","",""))
fSub.xID = 117
fSubSub = insFld(fSub,gFld("Approval","","#EDEBF1","","","",""))
fSubSub.xID = 123
fSubSub = insFld(fSub,gFld("Reports","","#FFFFFF","","","",""))
fSubSub.xID = 124
fSub = insFld(f,gFld("Images","","#EDEBF1","","","",""))
fSub.xID = 118
fSubSub = insFld(fSub,gFld("Equipment","","#FFFFFF","","","",""))
fSubSub.xID = 125
fSubSub = insFld(fSub,gFld("Sites","","#EDEBF1","","","",""))
fSubSub.xID = 126
fSub = insFld(f,gFld("Incoming","","#FFFFFF","","","",""))
fSub.xID = 127
fSubSub = insFld(fSub,gFld("Email","","#EDEBF1","","","",""))
fSubSub.xID = 128
fSubSub = insFld(fSub,gFld("Fax","","#FFFFFF","","","",""))
fSubSub.xID = 129


      // Load a page as if a node on the tree was clicked (synchronize frames)
      // (Highlights selection if highlight is available.)
      function loadSynchPage(xID){
            var folderObj;
            docObj = parent.UserHomeLeft.findObj(xID);
            docObj.forceOpeningOfAncestorFolders();
            parent.UserHomeLeft.clickOnLink(xID,docObj.link,'basefrm');

          //Scroll the tree window to show the selected node
          //Other code in these functions needs to be changed to work with
          //frameless pages, but this code should, I think, simply be removed
            if (typeof parent.UserHomeLeft.document.body != "undefined"){ //scroll doesn work with NS4, for example
              parent.UserHomeLeft.document.body.scrollTop=docObj.navObj.offsetTop
          }
      }
</script>

<!-- Build the browser's objects and display default view of the tree. -->
<script>
      initializeDocument()
            
      function reviewCheckBoxes(){
            elems = document.forms[0].elements
            ok = false
            for(rcb=0;rcb<elems.length;rcb++){ //using rcb so it doesn't collide with any "i's" in the other js
                  if(elems[rcb].type == "checkbox" && elems[rcb].checked){
                        ok = true
                  }
            }
            if(ok){
                  document.forms[0].submit()
            }else{
                  alert("You must check at least one box.")
            }
      }
      function subscribe(projectID,folderID,fileID){
            launchWindow("Subscribe.asp?SessionID=07Og9oI%&ProjectID=" + projectID + "&FolderID=" + folderID + "&FileID=" + fileID,500,350)
      }
      function launchWindow(url,width,height){
            var theLaunchedWindow = window.open(url.replace(/#/g,"%23"),"","scrollbars,resizable,width=" + width + ",height=" + height)
      }
</script>
</FORM>
</BODY>
</HTML>
0
Comment
Question by:SweatCoder
  • 3
  • 2
6 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 16761529
How about
  <SCRIPT LANGUAGE="JavaScript" SRC="./Integration/TranslationWYSIWYG/common.js"></SCRIPT>
  <SCRIPT LANGUAGE="JavaScript" SRC="JavaScripts.js"></SCRIPT>

No attachEvent or document.onmouseover or something?
0
 
LVL 11

Author Comment

by:SweatCoder
ID: 16761825
I did find one attachEvent in common.js, but even when I removed the linkage to that file, the problem still occurred.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 16762300
Impossible to help when we do not have the complete files.
TreeView_Permissions.js
is also adding onmouseovers I am sure
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 11

Author Comment

by:SweatCoder
ID: 17495143
I found the problem. I had a css file that was doing dynamic stuff and got into an infinite loop in the JS.
0
 
LVL 1

Accepted Solution

by:
BooMod earned 0 total points
ID: 17556831
Closed, 500 points refunded.
BooMod
Special Ops Mod
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question