Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
jQuery Within page causing page to lose responsiveness
#1
Hi,

I am having some trouble getting jQuery to work as expected on my website. I am Running GetSimple CMS on an Nginx server on a Raspberry Pi.

The problem is that the rest of the website become unresponsive when I have some jQuery script in a Page.
Here is the homepage with the problem occuring:
http://ragebflame.ftp21.net:1080/

This is the code that is currently causing the problems. I have tried a number of different simple example scripts from the net and I get the same result.

Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>

<div id="test" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
<script>
$(function () {
    $('#test').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Fruit Consumption'
        },
        xAxis: {
            categories: ['Apples', 'Bananas', 'Oranges']
        },
        yAxis: {
            title: {
                text: 'Fruit eaten'
            }
        },
        series: [{
            name: 'Jane',
            data: [1, 0, 4]
        }, {
            name: 'John',
            data: [5, 7, 3]
        }]
    });
});
</script>

The Highchart works fine, its the rest of the page that is the issue. Hyperlinks, menu items no longer work, etc.

Any help would be greatly appreciated.
Reply
#2
my antivirus blocks your site
so maybe thats your problem.

you are including unsafe js in your pages from some other domain, its probably infected.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(2014-02-06, 07:35:25)shawn_a Wrote: my antivirus blocks your site
so maybe thats your problem.

you are including unsafe js in your pages from some other domain, its probably infected.


Really ? Can I ask what antivirus you are using and what any details of what it is blocking ?

External js being used is:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
Reply
#4
it said one of those mal html thingys
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2014-02-06, 08:00:21)shawn_a Wrote: it said one of those mal html thingys

Just ran it thorugh VirusTotal. It seems that Sophos is flagging .ftp21.net bacause its dnsdynamic and someone must have been screwing around with an IP using it. False positive in this case though. I dont think that this has anything to do with the issue I am experiencing.

EDIT: you can perform a whois on the domain you will see it is a UPC Ireland host.
Direct Server IP: http://79.97.220.185:1080/
Although this may change, hence the dnsdynamic.
Reply
#6
Use chrome or ie11 profiler, it should be able to show what's running. If I had to guess your charting stuff is inefficient or bugged or you have some chart set to live updating or some looping.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
(2014-02-06, 10:30:53)shawn_a Wrote: Use chrome or ie11 profiler, it should be able to show what's running. If I had to guess your charting stuff is inefficient or bugged or you have some chart set to live updating or some looping.

Good advice, I will try this when I go home. I believe the javascript is fine however. It runs perfect and leaves the page responsive if I throw it into a test page by itself, Outside of GC CMS.

Code:
<html>
<head></head>
<body>
<h1>Testing highcharts</h1>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>

<div id="container" style="width:100%; height:400px;"></div>
<script>

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Fruit Consumption'
        },
        xAxis: {
            categories: ['Apples', 'Bananas', 'Oranges']
        },
        yAxis: {
            title: {
                text: 'Fruit eaten'
            }
        },
        series: [{
            name: 'Jane',
            data: [1, 0, 4]
        }, {
            name: 'John',
            data: [5, 7, 3]
        }]
    });
});

</script>


<a href="http://www.w3schools.com/">Visit W3Schools</a>
</body>
</html>

From what I can see, trying to run any jQuery is causing this problem.
Reply
#8
Then you have some jquery conflict, does your plugin or theme load its own version of jquery ?

I still cannot test your site, your bootstrap.js throws a mal html virus warning.
bootstrap should not do that, where did you get it from ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
Good point, I will have a look for jQuery conflicts.

Thats odd, The theme I am using is Twitter-Bootstrap GS: http://get-simple.info/extend/theme/twit...ap-gs/433/

The bootstrap.js would have come with that. That should be fine, I have made no changes.

hmm....Undecided
Reply
#10
yeah i just installed it and i use it on other sites and i get no warning.
double check yours and make sure it wasn't modified somehow or redownload it and diff it.

I see nothing in it that would cause false positives so either my sophos is wrong or giving wrong file or something. but it is very odd.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#11
Uncaught ReferenceError: $ is not defined (index):134
(anonymous function)
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#12
(2014-02-07, 02:41:25)shawn_a Wrote: Uncaught ReferenceError: $ is not defined (index):134
(anonymous function)


Yes the virus issue is odd. I have yet to investigate that further.

That error was to do with me messing around with the site. I have it to a stage where I think it should be working now but its the same issue. The graph is displaying now and the js console is clear. Still the site remains unresponsive however.

Next thing im going to try is switching the theme to the default. Maybe bootstrap is screwing with it somehow.
Reply
#13
Just switched the theme back to Innovation, the problem still exists. Kind of lost as to where to look now. Not sure if anyone else has a site to test this on ?



Thanks for your help on this so far btw.
Reply
#14
have you tried multiple browsers?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#15
i can test on a rpi later on..

but looking at the code, you got 2 jquery libs loading and css/js loading all over the page...
although its not sluggish at all for me...(im on UPC aswell so that might help...8)
My Github Repos: Github
Website: DigiMute
Reply
#16
you've got this bit of code on your page that turning off all your buttons/links etc...


Code:
        <script>
  $(function() {
    $( "input[type=submit], a, button" )
      .button()
      .click(function( event ) {
        event.preventDefault();
      });
  });
  </script>
My Github Repos: Github
Website: DigiMute
Reply
#17
(2014-02-07, 07:30:15)n00dles101 Wrote: you've got this bit of code on your page that turning off all your buttons/links etc...


Code:
        <script>
  $(function() {
    $( "input[type=submit], a, button" )
      .button()
      .click(function( event ) {
        event.preventDefault();
      });
  });
  </script>

Ah-ha!

Wow I feel like an Idiot, I had that thrown into the sidebar from when I was testing something else. Didnt even think to look at it.

Yeah I need to clean the code up, its all over the place.
It is running really nice on the rpi, I have been logging temp data so I'll see how it fares when it has to render alot more info.

Thanks a million for the help, Much Appreciated!
- Dan
Reply




Users browsing this thread: 1 Guest(s)