Skip to content

What’s the difference between JavaScript and JScript?

I have always wondered WHaT tHE HecK?!? is the difference between JScript and JavaScript. Answer Just different names for what is really ECMAScript. John Resig has a good explanation. Here’s the full version breakdown: IE 6-7 support JScript 5 (which is equivalent to ECMAScript 3, JavaScript 1.5) IE 8 s…

Highlight a word with jQuery

I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word “dolor” in this text: How do I convert the above to something like this: Is this possible with jQuery? Edit: As Sebastian pointed out, this is quite possible without jQuery &#821…

How to create query parameters in Javascript?

Is there any way to create the query parameters for doing a GET request in JavaScript? Just like in Python you have urllib.urlencode(), which takes in a dictionary (or list of two tuples) and creates a string like ‘var1=value1&var2=value2’. Answer Here you go: Usage:

Best Javascript drop-down menu? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, …

How to show a spinner while loading an image via JavaScript

I’m currently working on a web application which has a page which displays a single chart (a .png image). On another part of this page there are a set of links which, when clicked, the entire page reloads and looks exactly the same as before except for the chart in the middle of the page. What I want to…

Why doesn’t JavaScript support multithreading?

Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions? Answer JavaScript does not support multi-threading because the JavaScript interpreter in the browser is a single thread (AFAIK). Even Google Chrome will not let a single web page’s Jav…