Solved

jquery and ie9

Posted on 2013-06-12
5
450 Views
Last Modified: 2013-06-12
I have a simple page that works fine on my machine ( ie 8 ) , but not on someones with IE9.  

From what I'm told the page builds the list of <a href > but when they click a link it freezes and the Systems Engineer ends up having to reboot the web server.

Any ideas?

<html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">

    function newWindow( leaderID)
    { 
        window.location.href = 'PMQtrProgressReport.asp?id=' + leaderID;                
    }  

    $(document).ready(function () {
 
        $.getJSON( 'DynamicReturn.asp',{proc:"GetStaffList",params:"C"}, function (data) { 
                if (data) {
                    $.each(data, function (key, value) {
                        $('#pmList').append(
                            '<a href="#" OnClick="newWindow(' + value.SLTID + ');">' + value.SLTName + '</a>' + '<br />' 
                        );  //end append
                    }); // end each
                }
                else
                {
                    $('#pmList').append( 'There was no data to display' );
                }
            }) //end getJSON
            .fail ( function( jqxhr, textStatus, error ) {
                var err = textStatus + ', ' + error;
                $('#pmList').append( err );
            }); //end fail
    }); //end ready

</script>
<body>
    <h1>Program Managers</h1>
    <div id="pmList"></div>
</body>
</html>

Open in new window

0
Comment
Question by:KCTechNet
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
jrm213jrm213 earned 500 total points
ID: 39241903
If they have to reboot the server then there is something going on server side, not client side that is causing the problem. Could it be the an issue with the specific link they are clicking and the page that it opens?

For example what happens if PMQtrProgressReport.asp receives a bad value for the id parameter, or what if that persons records has data in it that is causing an infinite loop in PMQtrProgressReport.asp.
0
 

Author Comment

by:KCTechNet
ID: 39242068
I will look into the ASP page, but why would it work fine on my machine?
0
 

Author Comment

by:KCTechNet
ID: 39242093
Ahh, I think  I found it...

there is one link that would have yielded in data that had errors...and that is the one link that they would be clicking.  All the others that I was testing had no data issues.
0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 39242106
You clicked a different user?

All setting window.location.href does is redirect the browser to a different page. If it is hanging when that happens then it is most likely hanging while trying to load that page. If the server actually stops responding when that page is loaded then there is probably a coding issue (reading too much into memory, infinite loop, etc..)

can you post a link to the page in question (though I wouldn't want to make the server stop responding by testing it).

I would try some different browsers if possible (firefox, chrome, safari) all clicking exactly the same link. If it solely happens on IE9 then you might need to get a copy of IE9, turn on the developer tools and see what is actually happening when those links are clicked.

My gut feeling is it is an issue with a specific user's id causing a problem on the page your link is trying to load.
0
 

Author Comment

by:KCTechNet
ID: 39242768
No, it was an issue where one of the links was leading to some data that would have resulted in an invalid sql statement in the ASP page it was opening.  It's all good.

well, except for the fact that a 'save' routine is not working correctly, causing this 'bad data', but that will be in another question I am going to post right now. :)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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…

778 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