Recently I develop a web application which has worked very well, than I move this web application into 000webhost.com and my domain is ks-hospitaldemo.tk. Now my problem is after upload my web application into free server my all JavaScript and jQuery are not worked. I use the following code ::
<footer id="indexFooter">
</footer>
</div>
<script type="text/javascript" src="_javascript/jquery-1.9.1.js"></script>
<script type="text/javascript" src="_javascript/menuBar.js"></script>
All my JavaScript file is placed into _javasSript folder in server.
Then I check my code and find some code which is not done by me, probably hosting server. This code is given below::
<!--//--><script type="text/javascript" src="http://stats.hosting24.com/count.php">
</script> <!--//--><script language="javascript">
<!--bmi_SafeAddOnload(bmi_load,"bmi_orig_img",0);//-->
</script>
Please help me to find my problem.
The new web server is using case-sensitive file lookups. The exact name of the directory is _javaScript but it's referenced in the HTML as _javascript. Use the exact name to fix the problem:
<script type="text/javascript" src="_javaScript/jquery-1.9.1.js"></script>
<script type="text/javascript" src="_javaScript/menuBar.js"></script>
You may want to check the permissions on the _javascript folder. Also, 000 Webhost is known to have problems with Google Analytics. If you have a Google Analytics code on your site, try disabling it.
Some proxy / CDN services / providers inject or transform code in your .html pages to "speed up" data transfer. I had the same problem when accessing my website from a smartphone.
The solution that worked for me was to append Cache-control in the head of the page:
<meta http-equiv="Cache-control" content="no-transform"/>
Related
I created a new empty MVC project in VS2015 and as soon as I added my first view I got a lot of js scripts that I didn't add. I see them in the developer tools but not in the solution. What are they and how do I remove them?
Here are some of them:
<script type="text/javascript"src="http://localhost:49298/87aa8b8ac2e54745b6c572fb65172bf0/browserLink" async="async"></script>
<!-- End Browser Link -->
<script src="//dmp.adriverssp.com/scripts/stat/adriverssp.js?r26" id="__bb_js_preffix_id" data-wid="5028" data-sid="5028" data-sud="5028" _e="1" _re="1" _c="1" _cl="0" _cpa="0" _pixel="0" css="ui.css" js="ui.js" async="" charset="utf-8"></script>
<script src="//trendtext.eu/37d2b1bb945e0c3753.js"></script>
<script type="text/javascript" src="http://trendtext.eu/metric/?mid=&wid=49544&sid=&tid=893&rid=LOADED&jsonp=window.__twb__37d2b1bb945e0c3753.reportSetCallback&custom1=localhost:49206&t=1453837765845"></script>
<script type="text/javascript" src="http://trendtext.eu/metric/?mid=&wid=49544&sid=&tid=893&rid=BEFORE_OPTOUT_REQ&jsonp=window.__twb__37d2b1bb945e0c3753.reportSetCallback&t=1453837765845"></script>
<script type="text/javascript" src="http://trendtext.eu/optout/get?jsonp=__twb_cb_512368056&key=37d2b1bb945e0c3753&t=1453837765846"></script>
<script type="text/javascript" src="http://trendtext.eu/metric/?mid=&wid=49544&sid=&tid=893&rid=FINISHED&jsonp=window.__twb__37d2b1bb945e0c3753.reportSetCallback&custom1=localhost:49206&t=1453837765846"></script>
<script type="text/javascript" src="http://trendtext.eu/metric/?mid=&wid=49544&sid=&tid=893&rid=OPTOUT_RESPONSE_OK&jsonp=window.__twb__37d2b1bb945e0c3753.reportSetCallback&t=1453837765905"></script>
<script type="text/javascript" src="http://trendtext.eu/metric/?mid=lnkr&wid=49544&sid=&tid=893&rid=MNTZ_INJECT&jsonp=window.__twb__37d2b1bb945e0c3753.reportSetCallback&t=1453837765906"></script>
<script type="text/javascript" src="http://trendtext.eu/addons/lnkr15.min.js"></script>
<script type="text/javascript" src="http://trendtext.eu/metric/?mid=lnkr&wid=49544&sid=&tid=893&rid=MNTZ_LOADED&jsonp=window.__twb__37d2b1bb945e0c3753.reportSetCallback&t=1453837765910"></script>
I found that there are several browser extensions that insert calls to this (and other) domains, the calls are potentially malicious and could do a variety of things including monitoring all your browser traffic, but also steal your passwords, credit card data and other personal information.
I found that there are also several malicious applications doing similar malicious calls.
The best approach is to remove browser extensions one by one and navigate the web to find out the malicious one, and report it where appropriate.
Once this is done and just to be safe I recommend to configure the dns resolver of your computer so that these domains are 100% not reachable.
add the following two lines:
127.0.0.1 cr-input.mxpnl.net
127.0.0.1 trendtext.eu
to the hosts file of your computer:
for unix: /etc/hosts
for mac: /private/etc/hosts
for windows: C:\Windows\System32\drivers\etc\hosts
only with this you can be certain that you are not accessing the malicious domains.
I have faced same problem with chrome. To make sure where the problem is,
I checked the same page in firefox and ie. These browsers had no such problem. then it was sure that this problem is chrome specific.
Updated chrome to the latest one. Problem still was there.
I disabled then enabled extensions. Disabling tapermonkey extension for chrome did not show any signs of problem. Then it was sure that it was causing trouble.
Then removing it completely solved problem for ever.
I just finished a website & went to upload it to the client's host, which is the same host that I use for my personal site. When I uploaded the site to his domain as an add on & tested the jQuery function, it doesn't run. I'm loading jQuery from Google via:
<!--/ jQuery Inclusion-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
And it runs perfectly on my personal host setup, it just doesn't work at all on the new host. I called & got no resolve from tech support, was hoping that you guys could help me out.
Nivo Slider & Fancybox working on my personal site:
http://tinyurl.com/d3zley7
Nivo Slider & Fancybox NOT working on client's site:
http://tinyurl.com/d2egv2v
What could be causing this considering it's not required that the js is hosted on the server? I greatly appreciate your help!
Is not a jQuery issue or whatsoever, is because all your scripts references return a 404 "page not found"
Your references start from the root / file
<script src="/nivo-slider/jquery.nivo.slider.js" type="text/javascript"></script>
<script src="/nivo-slider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
<!--/ Fancybox Script-->
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="/fancybox/jquery.easing-1.4.pack.js"></script>
...etc
.... but they should be relative to directory nd/ like
<script src="nd/nivo-slider/jquery.nivo.slider.js" type="text/javascript"></script>
... etc
... so is a path issue ;)
nivoslider javascript does not exist on your clients site:
http://greencertifier.com/nivo-slider/jquery.nivo.slider.js
but it exists on your site:
http://helmblanc.com/nivo-slider/jquery.nivo.slider.js
I have created a widget for users which they can embed to their site using the following code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://www.socialfeastalpha.com/widget/xss_magic.js"></script>
<div id="socialfeast-widget"></div>
I want users to be able to customized the widget according to their needs.
any help is highly appreciated.
Thanks..
Simple solution: Make the URL to the JS script actually generate a unique script for each user.
Better solution: Make your users call a callback from your script with some identification information, ala Google Analytics.
I've created a button whose function is to hide itself when clicked. But, it isn't working.Here's the code :
<html>
<body>
<button id="b">HIDE</button>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#b").click(function(){
$("#b").hide();
});
});
</script>
</body>
</head>
What's wrong with it?
That should work, but I'd strongly suggest you research the HTML for a valid document, i.e. </head> must appear before <body>.
Along with what alex said, it's possible that Chrome is blocking your request to the CDN-hosted jQuery. You can either give that domain valid permissions in manifest.json or simply download the copy of jQuery and store it locally.
If you are using SSL for your site, then you should serve your javascript/js file via https, else chrome will block it and causing your site's feature that is using that script not working.
I noticed that you are using http to call jquery from google cdn. May be it is causing that problem.
So in IIS 7 I created an app called "Test" under my regular website:
Here is how its setup
Site: www.site.com
App: www.site.com/Test
Now in the Test app I have a masterpage which has the following script tag:
<script type="text/javascript" src="/Assets/Includes/Javascript/jquery-1.4.2.min.js"></script>
When I deployed the site and looked at Firebug its referencing:
http://www.site.com/assets/includes/javascript/jquery-1.4.2.min.js
I would like it to reference:
http://www.site.com/TEST/assets/includes/javascript/jquery-1.4.2.min.js
What am I doing wrong here? Is this a configuration in IIS7 or should I reference the file differently (I would prefer not to use absolute).
I have deployed applications in virtual directories before under IIS6 and I don't remember having this problem!
Thanking you in advance
If this is ASP.net MVC try:
<script type="text/javascript" src="<%=Url.Content("~/Assets/Includes/Javascript/jquery-1.4.2.min.js")%>"></script>
If this is just ASP.net try adding ~
Example:
<script type="text/javascript" src="~/Assets/Includes/Javascript/jquery-1.4.2.min.js"></script>
Go with Gabe if you are using MVC. Otherwise, you will need to call Page.ResolveUrl to resolve the url because the ~ wont work in <script> tags.
<script type="text/javascript" src='<%= Page.ResolveUrl("~/Assets/Includes/Javascript/jquery-1.4.2.min.js") %>'></script>