I like jQuery and I was wondering if anyone have used a good plugin or (non-jQuery) JavaScript library that allows for auto-formatting of structured fields like phone numbers or dates. I know of the jquery-ui-datapicker plugin, and not what I am looking for here. You may type in a phone number as 123 which then becomes (123), additiona...
I want to do this:
e.className = t;
Where t is the name of a style I have defined in a stylesheet.
...
Already know of one very good resource:
Douglas Crockford's videos over at
Yahoo UI Theater.
Please suggest any others you are aware of.
...
Joel always said to be careful when using 3rd party libraries. From my initial impressions, JQuery is great. What should I beware of when using it? What are it's limitations? What headaches will I run into later on as I use it more?
...
Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin?
It would be best if i didn't have to add any extra fields to the model, but if i really have to i can.
...
Like the old Albert said : "If you can't explain it to a six-year old, you really don't understand it yourself.”. Well I tried to explain JS closures to a 27 years old friend and completely failed.
Can anybody consider than I am 6 and strangely interested in that subject ?
EDIT : I have seen the scheme example given in SO, and it did n...
I have a webservice that when called without specifying a callback will return a JSON string using application/json as the content type.
When a callback is specified it will wrap the JSON string in a callback function, so it's not really valid JSON anymore. My question is, should I serve it as application/javascript in this case or stil...
CPU Cycles, Memory Usage, Execution Time, etc.?
Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs?
...
I have a simple unordered list that I want to show and hide on click using the jQuery slideUp and slideDown effect. Everything seems to work fine, however in IE6 the list will slide up, flicker for a split second, and then disappear.
Does anyone know of a fix for this?
Thanks!
...
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 dict (or list of two tuples) and creates a string like 'var1=value1&var2=value2'
...
In terms of quick dynamically typed languages, I'm really starting to like Javascript, as I use it a lot for web projects, especially because it uses the same syntax as Actionscript (flash).
It would be an ideal language for shell scripting, making it easier to move code from the front and back end of a site, and less of the strange syn...
Hi,
On my team, we usually do string concatentation like this:
var url = // some dynamically generated URL
var sb = new StringBuffer();
sb.append("<a href='").append(url).append("'>click here</a>");
Obviously the following is much more readable:
var url = // some dynamically generated URL
var sb = "<a href='" + url + "'>click here</...
We have a RTE editor based on htmlarea which consists of content with editmode enabled inside an iframe. The question is how to automatically bring the focus into the editor.
...
Hi!
I'm getting a JS error on displaying a page: Nothing concrete is specified but the line where it seems to be thrown. When looking into the source code of the page, I see the error is thrown inside the following script, but I can't understand why! It's only about loading images!
<SCRIPT language=JavaScript>
<!--
function newImag...
I've got the following situation
A rails application that makes use of rjs / Scriptaculous to offer AJAX functionality
Lot of nice javascript written using JQuery (for a separate application)
I want to combine the two and use my JQuery based functionality in my Rails application, but I'm worried about JQuery and Scriptaculous clashin...
Hi,
I'm trying to build a web page with a number of drop-down select boxes that load their options asynchronously when the box is first opened. This works very well under Firefox, but not under Internet Explorer.
Below is a small example of what I'm trying to achieve. Basically, there is a select box (with the id "selectBox"), which ...
I've written a control in C# that overrides the built-in DropDownList control. For this I need a javascript resource included, which I'm including as an embedded resource then adding the WebResource attribute, which works fine.
However, I also need to reference a webservice, which I would normally include in the scriptmanager on the p...
Is there some way to hide the browser toolbar / statusbar etc in current window via javascript? I know I can do it in a popup with window.open () but i need to do it this way. Is it possible at all?
...
I'm trying to implement a pop-up menu based on a click-and-hold, positioned so that a (really) slow click will still trigger the default action, and with the delay set so that a text-selection gesture won't usually trigger the menu.
What I can't seem to do is cancel the text-selection in a way that doesn't prevent text-selection in th...
I don't think I've grokked currying yet. I understand what it does, and how to do it. I just can't think of a situation I would use it.
Where are you using currying in javascript (or where are the main libraries using it)? DOM manipulation or general application development examples welcome.
EDIT: One of the answers mentions animation....