Javascript Alert Boxes not working in Chrome - javascript

This is weird, The following line of javascript:
alert("test");
gives the following error in chrome:
Uncaught TypeError: Property 'alert' of object [object DOMWindow] is not a function
It also breaks when using a prompt. Oddly it works in firefox. Any ideas?

Do you have a another pop up blocker plug-in installed on Chrome? If you do, disable/remove it and see if the error goes away.

Is your Javascript enabled in the Chrome options?
Other thing is any other js library included which might change default js behaviour?

As epascarello said its because of popup blocker plugin and I faced this problem with my localhost websites and prompt method.
So i fixed it by adding my localhost url to popup blocker's whitelist: http://localhost

Related

ajaxToolkit AutoCompleteExtender Chrome error

Facts:
ajaxToolkit AutoCompleteExtender in this specific screen works fine in IE, and Firefox
ajaxToolkit AutoCompleteExtender works fine in Chrome, in a different screen, same application
But not here. Right now I am getting errors like this:
Uncaught Error: Sys.InvalidOperationException: Type
AjaxControlToolkit.Animation.Animation has already been registered.
and
Uncaught Error: Sys.ScriptLoadFailedException: The script
'http://abc/def/ScriptResource.axd?d=uZ7YXSkj4n5b51-4hy2B1kBoyWBzAKQobQalIia8aju5_q790-3ZI8fdE9mfezSEesp77ToyxGv7_erOfA-X853srHT0dJkwMzZ98t3kSUkbkMEhd1StAYZDits_77x15a31Dr-0FO4ytW-aNwix2qkS_181&t=634263938860000000'
failed to load. Check for: Inaccessible path. Script errors. (IE)
Enable 'Display a notification about every script error' under
advanced settings. Missing call to
Sys.Application.notifyScriptLoaded().
Anyone ever had any issues like this?
Scriptresource.axd is not something I tried to change before, so I am feeling totally lost.
So after a lot of debugging, I removed the UpdatePanel from the screen, and it is working fine in Chrom, Firefox, and IE as well.

WordPress Theme Uncaught TypeError

My website was working fine until the other day. I don't know what's happened but the dropdown system for everything has stopped working completely - even the Admin bar.
When I open up the JavaScript Console in Google Chrome when I'm on the site homepage, I get this message for each dropdown item:
Uncaught TypeError: Object #<Object> has no method 'on'...
I don't know how to fix this, I've looked everywhere. Would it be in the themes "Header.php" file? If so, whereabouts?
I found the problem! I wen into the plugins section of Wordpress and disabled "LikeLocker". The only problem is, now I've got to go into the plugins code and try to figure it out haha.
Thank you anyway!

JS assets in a subdomain wont load on ff & ie but chrome is all good

We are building a Saas product and have purchased a bootstrap dashboard, all the JS/CSS assets are loaded though a sobdomain via our CDN.
Works perfectly on chrome but on ie and ff the components do not load properly, on ff I get the following errors:
TypeError: can't access dead object
ReferenceError: event is not defined
A link to a non working example is below (We don't want to give access to our working dashboard for commercial reasons) You can see the error when click on the "dropdown" menu item. As far as I can tell, all the assets are loading correctly.
http://hunchbuzz.com/acme/index.html
Any help would be appreciated.
Well, take your bugs one by one. Did you turn on the JavaScript Debugger when you tested your page in IE? In the F12 developer tools, select Script and then Start Debugging.
First there were a couple of errors in jquery.sparkline.min.js which I ignored for the moment. Then I tried clicking your 'dropdown' link and got this error:
SCRIPT438: Object doesn't support property or method 'preventDefault'
custom.js, line 3 character 1193
The highlighted code is (reformatted for readability):
$('.dropmenu').click( function(){
event.preventDefault();
// ...
});
Do you see the problem? What is event? The code should be:
$('.dropmenu').click( function( event ){
event.preventDefault();
// ...
});
The fact that it worked in any browser at all is probably due to the global event variable that some browsers create for compatibility with very old code.
Now back to the sparkline problems. I see it hitting two errors in jquery.sparkline.min.js, but with the minimized code the problem isn't jumping out at me the way the other one did.
When you're debugging, it would help a lot to load the non-minified versions of jquery.sparkline.js, custom.js, jQuery, etc. Then you'll have readable code to look at in the debugger, which should make it easier to spot these problems.

plugin from http://trentrichardson.com/Impromptu/ is not working in IE8

please help me to sort out my issue.
i got a plugin from http://trentrichardson.com/Impromptu/ and when i try to open a popup window (iframe) in IE8 it is not working but Firefox ,chrome ,safari and IE9 are working properly.
The error says that
SCRIPT5007: Unable to get value of the property 'constructor': object is null or undefined
jquery-impromptu.3.2.min.js, line 37 character 9
Thanks
try updating your jquery version
they are using jquery v1.7.1 may be that can help you and also they are using impromptu.4.0.min.js please upgrade both files and then try
make sure you have included all the required js file try viewing source code of their site
you can download jquery v1.7.1 from here
all the best

alert because of one of JavaScript functions

In our application we have a lot of JavaScript functions and sometimes an "[object Error]" alert comes out from nowhere when using IE7. It happens sometimes. The problem is that I can't figure out which exact function is causing that error. Any hint on how I can debug this?
Thanks.
If you are using IE, then when there is an error in your JavaScript code, there will be an error indicator on the left bottom of the browser window, you can click it to see which line of the JS code goes wrong
base on this article, it is a bug in IE7
Go to the Developer Tools debugger and select Break on Error.

Categories

Resources