How to block a certain Javascript?

jappe66

Honorable
Apr 13, 2012
6
0
10,510
So I'm using a website builder application provided by my web host. I wanted to add a slideshow of images with JS and now it won't let me edit the front page anymore. The website builder uses Javascript as well so blocking JS from Chrome's settings won't help. Is there any way to block a certain script on the site? I'm using this script: http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm
 

Rusting In Peace

Distinguished
Jul 2, 2009
312
0
19,060
In Firefox's Firebug add on you can modify the current page HTML and styling. I think you can do the same with Chrome's in build developer tools accessed from, unsurprisingly, the tools menu.

If you know the code you don't want to run just alter that onclick or whatever. Note thought that if you refresh the page or navigate away you'll lose your modifications.

Other than that I think you might have a hard time disabling just one part of the Javascript. Most developers will have code in line or encapsulate Javascript code in an entire file or a series of files over having something as mental as a file per Javascript function.

Have you considered that your JS might be breaking the front page which is why you can't do the edit you need? Check the console for Javascript errors.
 

Rusting In Peace

Distinguished
Jul 2, 2009
312
0
19,060
So something on your page is breaking the loading of the JQuery javascript library (presumably what the website builder application is using). The dynamic slideshow you are using isn't using JQuery; it's native Javascript.

If you're paying for your web hosting then you are probably entitled to some support from them. I'd ask them to investigate your issue - you may even be helping other users using their web hosting with a similar issue.
 

jappe66

Honorable
Apr 13, 2012
6
0
10,510
Yeah I asked them and they removed the JS from the source code and it's now fixed. Don't really know what was causing this but it's fixed now :)