开发者

Javascript not working on IE 7 and IE 8 on Vista

开发者 https://www.devze.com 2023-03-17 15:59 出处:网络
An Example of this can be seen here: http://nces.ed.gov/datalab/quickstats/default.aspx Try clicking on one of the groups on the left and it should refresh the workspace with that group.

An Example of this can be seen here: http://nces.ed.gov/datalab/quickstats/default.aspx Try clicking on one of the groups on the left and it should refresh the workspace with that group.

It works fine on all browsers in Windows 7 but fails in IE 7 and IE 8 on Vista.

I have this function:

     function SelectGroup(gid,开发者_Go百科 glevel, gtext) {
         alert('not running on my environment only in vista');
    }

And this is what calls it:

      <a href="javascript:SelectGroup('3','3','Beginning college students')" style='text-decoration:none;'><span id='span_draggable_3' onmouseover="NavOver('3','3')" onmouseout="NavOut('3','3')" style='cursor:pointer;'>Beginning college students</span></a></div>


Some general suggestions:

  1. Try to look if you have error messages, what do you mean by failed?
  2. Try first with FireFox, it has better development tools.
  3. IE8 has decent enough debugging tools, why wouldn't you use this?
  4. Use a library like Mootools and JQuery to abstract differences between the major browsers
  5. What about the old alert way of debugging things, have you tried it?
  6. Try to narrow the problem the best you can, from my experience, this snipet is too big

edit: By telling in comments alerts don't run, it means you have an actual JS error somewhere and not a logic bug. Click on the error signal, bottom left of browser (yellow triangle with ! I believe), what is the message?

Edit: My friend, you have two other events I missed, What is the code of the onmouseover event, this might trash your code. AND you have a </span> in the wrong place (no matching opening tag) this can also cause issues.

0

精彩评论

暂无评论...
验证码 换一张
取 消