1

I don't face this problem while working on localhost only when I access the page using the IP address of my system this happens and it only happens with IE (works on all other browsers).

By the way I'm using Tomcat V6.0.0.29, IE8

I tried debugging the JS code using IE developer tools debugger, of course when I open using http://localhost:8080/ everything works perfectly fine, but when I use http://myIP:8080/ this loop is giving a problem.

$('#someId > div').each(function(){...}); 

As in this loop doesn't run at all, it just kind of skips it. I have checked the IDs they are fine moreover it's working in localhost why should it give a problem when I access it using my IP?

I also tried using Apache 2.2 with Tomcat as container but it gives the same problem.

Tablemaker
  • 1,159
  • 1
  • 11
  • 23
pranky64
  • 121
  • 1
  • 3
  • this question was also posted in stackoverflow follow the link to view the discussion there http://stackoverflow.com/questions/8223584/jquery-someid-div-eachfunction-not-working-in-ie – pranky64 Nov 22 '11 at 12:06

3 Answers3

1

Please check your .js calling html command.

 <script type="text/javascript" src="http://localhost:PORT/a.js">

Please change it to

  <script type="text/javascript" src="http://YOURIP:PORT/a.js">

Also IE have same problem on font defination.

Huseyin
  • 126
  • 1
  • 1
  • 6
  • I'm not using absolute paths, i'm using relative paths! and the js and jquery are loaded because i can see them in the IE debugger!! – pranky64 Nov 22 '11 at 12:13
1

I guess this question wasn't really meant for serverfault it was a problem with IE7 any way here is the answer Check out the answer here!!!

pranky64
  • 121
  • 1
  • 3
1

This may due to the group policy of your company for forcing Intranet sites using a specific version of IE in compatibility mode. I experienced exactly the same issue when I introducing some IE10+ Javascript libraries to my page.

Please see the Details for my other post on another thread as follows.

Conan
  • 111
  • 1