jsbin produces "Script error. (line 0)" when using console.log("test") - jsbin

I wrote a one line JS script in jsbin and in the console, it spits out an error.
console.log("test");
In the console on jibs, it shows:
"error"
"Script error. (line 0)"
test
Why? Pretty valid piece of code.

I believe the problem is with the browser, not Jsbin. I posted this answer in case others experience it.

Only need to press the new file in the upper left corner

Related

Link text is Unclear error even when <a> tag has descriptive links. ( tota11y)

I have a tag, which has the following structure
Regenerate
Even though it has the descriptive links, tota11y throws an error "Link Text is unclear".
I am not able to figure out why it is throwing an error.
This issue is not reproducible with the recent version of tota11y.

Error shows "Failed to get text for stylesheet (#): No style sheet with given id found", what does this mean?

I'm getting this error in Chrome when it loads this application I am working on:
Failed to get text for stylesheet 50: No style sheet with given id found
Subsequent page loads repeat the error, but with a different number:
Failed to get text for stylesheet 152: No style sheet with given id found
This only happens in Chrome, and only with this application. There is no stack trace, reference, or any other information about what id is given, what the stylesheet in question is, or what is causing this generally. How can I find what is causing this error and fix it?
I had the same problem. It looks like a bug in Chrome's live-edit CSS/JS. Notice how the number changes on each request.
I fixed it by closing all the files that I had edited in the dev tools 'source' tab and then refreshed the page.
The error went away after I closed all the files in the 'source' tab.
I tried to reproduce it after closing the files, but I can't seem to recreate it, yet.
Here is a picture showing where to find the 'source' tab:
Still present in Chrome 46.0.2490.80 m (64-bit).
Closing sources tabs 'fixed' it.
Fixt it by holding [Ctrl] + [Shift] and refresh the page
Just experienced this today if you have a .css file open in the dev tools. If you close the .css file and reload, the issue does not happen.
Chrome 48.0.2564.109 (64-bit)

RequireJS text! plugin and Load timeout

I'm using the text! plugin with RequireJS and Firefox seems to hate my text templates. My code seems to work just fine in Chrome and Safari. Here is the error I get.
Error: Load timeout for modules: text!templates/a.html_unnormalized2,
text!templates/b.html_unnormalized3,
text!templates/c.html_unnormalized4, // _unnormalized# <- What is this?
...
text!templates/n.html, // I don't see _unnormalized here... why?
text!templates/o.html,
text!templates/p.html,
...
http://requirejs.org/docs/errors.html#timeout
First, what does the _unnormalized# mean? It seems to append itself to the file name for some of my templates but not all. However, all of my templates are listed in the error message.
Looking at the Net inspector, it seems to be downloading the necessary template files.
I think I figured it out part of the mystery, although I'm not sure about the details. I noticed that this error occurs when I'm using Firebug and in the console options, ShowXMLHttpRequests is turned on. By turing this option off, the page loads without a hitch.
What do you think guys, is this a Firebug problem? Or a requireJS issue? I'd love to understand why this occurs.
In my case, if I just disable the "Script" tab of FireBug, I have no more freeze or time out error.
Firefox 27.0.1
Firebug 1.12.7

FPDF with Classic ASP, Image Error

Let's preface this post by saying... Yes, I know I'm a dinosaur for using Classic ASP in this day and age!
I'm using FPDF.asp to generate a PDF on the fly.
Everything works fine and as expected on my test server. On my live server, however, I encounter an error, if I try to output an image as part of my PDF. I know the syntax is correct, since it works on the test server as it should.
The error I receive on my live server is: "File does not begin with '%PDF-'."
If I comment out the line that adds the image, the file loads up properly and error-free!
Does anyone have any idea, as to what may need to be corrected on the live server to eliminate this problem???
Any help would be most appreciated.
Mitch
Update!
Not sure why having an image or not makes the difference, BUT the solution turned out to be that I had some HTML code mixed in with the output and this caused FPDF to fail when an image was included.
Removed the HTML code and problem solved!
-Mitch

Why is my javascript function not found by the page it is embedded in?

I have a page that has a simple javascript in the header portion of the page:
<script type="text/javascript">
function doLogout() {
var conf = confirm("Really log out?");
if (conf === true) { //changed == to === for boolean comparison
$.post("logout.aspx");
}
}
</script>
It uses jQuery to do an AJAX post to my logout page. The only issue right now is that when I click on the link (logout) to fire this function, nothing happens. I checked FireBug's console, and it told me that the function is not defined. This has happened to me before, but I think I botched a bunch of code to fix it sometimes.
Does anyone know the proper way to fix this issue?
Edit
After doing a lot of googling and trying different things, I found this very concise and informative post. Apparently, as the linked article states, the way the script is referenced in the web site is important as it won't run properly otherwise! Hopefully this information will be useful for more people.
This can also occur if there is a syntax error earlier in your javascript code. Often this will just be interpreted as the function not existing (nor any function AFTER the error). Check the code above this code (if there is any) and this code for syntax errors.
A way to tell if the cache error is it is to open Firebug and view the Script source. If the page was cached, you won't see your code. If it loaded but has syntax errors, the code will show, though it won't "find" it.
Things to test:
1) Can you call this function from something else? Like add a <script> at the bottom of the page to call it?
2) Does the page validate? Sometimes I get screwy javascript errors if there is some busted HTML like a missing </b>
3) I've been starting to wrap my javascript in <![CDATA[ ]]> just incase I've got goofy chars in my javascript.
4) I assume you've tested this in other browsers and have the same behavior, right?
5) If you haven't installed it already, install the Web Developer firefox addon. It has a nifty toolbar menu that will disable the cache for you so everything reloads.
6) As weird as it sounds, I once hit a javascript issue that was because of how my text editor was saving UTF-8 files. I forget the details, but it was adding some byte-order-mark or something that upset the browser.
I've had this occur when the page had been cached and so it didn't load the new script in. So to fix it clear all private data from Firefox. Not sure if that helps but it sure happened to me a bunch.
Other ideas for you to test:
is the function defined in the DOM tab in FireBug?
if you call doLogout() from the FireBug console, what happens?
I assume this is not the only script on that page. Make sure that some later script is not modifying doLogout to something else
I had the same issue and tried all that's been suggested here without success.
The only way I fixed it was by discovering that in the <script src="jquery.js"> tag I was using in the head of the page I forgot to close it with its </script> causing the page to ignore all Javascript functions. So please check that your includes look like:
<script src="jquery.js"></script>
I hope that helps. Ross.
If you are using DevExpress controls these links may help you: How to register and execute a JavaScript downloaded to the client via a callback and How to register and execute a JavaScript downloaded to the client via a callback (standalone JS file) and Executing javascripts from user controls dynamically created through ASPxCallback panels
The issue might occur if you have NoScript. You should check and make sure it's not blocking said script.
I had this issue and discovered the problem was just a wrong case letter inside the name.
Call: filterCheckbox()
vs
function filterCheckBox() {}
problem: lowercase "box" vs uppercase "Box".
So check if the name is exactly the same.

Resources