I have a problem using $.getScript() on chrome. It doesn't work on chrome browser. I've tested it on firefox, ie and safari and it worked. All I have on my external script is an alert() and it doesn't work.
Here's the code:
page
$(document).ready(function(){
$("#btnGet").click(function(){
$.getScript("script.js");
});
});
script.js
alert('Get script loading');
Is anyone have experienced this problem?
Thanks guys for making it clear to me.
I think I would have my script inline instead since the inline code will work fine on all browsers.
Related
My Code:-
<BODY onload="redireccionar();">
<SCRIPT LANGUAGE="JavaScript">
function redireccionar() {
setTimeout("self.close()", 500);
}
</SCRIPT>
Above is my code regarding facing issues on chrome and firefox while it works fine with IE. I have tried almost all functions available here but still facing the same.
please suggest any solution. Thanks in advance.
I searched everywhere and found out that you have to trick the browser into thinking it was opened w/JavaScript. This worked for me in Firefox and IE:
Close this window
I'm working on a simple site using handlebars.js. It works just well in FF, Chrome, IE11 and Mobile Browsers. However, in IE9 the template is not gonna be rendered. Does anybody have an idea what the problem could be?
here's the site:
http://dev.thomasveit.com/zuzuegler
any help is very appreciated!
Quickly looking at your code reveals you use HTML5 tags, such as Footer or even more.
IE9 unfortunately is not able to render HTML5 tags.
There are many ways to fix your problem... best IMO is to try using Modernizr
Just include it in your html file, and your problem will be solved.
I just figured it out. The problem was indeed the html5shim for IE9. I just removed it and now it works fine.
Here is a working example of my code on jsFiddle http://jsfiddle.net/ezanker/8z5Rz/6/
The problem is that when I test the script localy on firefox or chrome the script stops (tested with alerts) on:
content.collapsible();
and
$('#set').collapsibleset();
does anyone have an idea why this happens?
Thanks.
I know this is an old question but before you dismiss it, just here me out.
I am developing a site and everything (including javascript) works perfect in Firefox 24.0 and Chromium 28.0. I have not tested in IE coz am on an Ubuntu 13.04 machine. I tested in Opera 12.16 and suddenly my javascript doesn't work.
Javascript is checked in opera preferences and all my external jquery and javascript scripts have the type="text/javascript" part. Still no good. I have commented out all my external script files including jquery and then added a
<script type="text/javascript"> alert('JS working'); </script>
in the head. Still no good. Alert working in Firefox and Chrome but not in Opera.
I have checked these questions out, still no good:
javascript not working in OPERA
Javascript does not work in Opera - strange
I don't know what's going on with Opera and its really confusing.
Any help appreciated.
Update:
There are no javascript errors in the dragonfly error console.
Sounds like JS is disabled in Opera. Pless and select Enable Javascript.
I just use window.history.go(-1) to return previous page in firefox, it won't work if the script in a iframe, it works fine in ie , opera and chrome. can somebody tell me why?
I did tried
window.history.go(-1)
in Firefox 3.6.8 and it did worked for the iframe ... try creating a simple html page to test if it's working for youur version of FF (I'm quite sure it will work), so maybe the problem is somewhere else