javascript

Best Javascript IDE

Which is the best IDE available for Javascript development? ...

JavaScript Editors for .NET Programmers

I am a .NET developer, what JavaScript editor would make sense to use if I spend most of my day in Visual Studio? ...

Looking for a good date range picker. Any suggestions?

We're building a dashboard similar to what Google Analytics has done and want a date range picker similar to theirs. Is anyone aware of an off the shelf javascript utility that can do this? I suppose we could roll our own if needed, but would love to find something ready to go. Below is an image of what Google's looks like. ...

IE6 textBox.focus(); causing "Unexpected call to method or property access"

The issue is now resovled :) Thanks for everyone's help and attention! I'm getting the JS error "Unexpected call to method or property access" in IE6 intermittently on the line "oAutoCompleteTextBox.focus();". Hopefully, someone has seen this issue before and can provide some insight on how to solve it. Below is the context of the usa...

JSON array starting with bit 1

my JSON array is like this; var foo = [{"aid":"1","atitle":"Ameya R. Kadam"},{"aid":"2","atitle":"Amritpal Singh"},{"aid":"3","atitle":"Anwar Syed"},{"aid":"4","atitle":"Aratrika"},{"aid":"5","atitle":"Bharti Nagpal"}] if i select any element, for example, alert(foo[0].atitle); output: Ameya R. Kadam the first element's atitle val...

Array-like object in javascript

Looking through the dom.js source from the Closure library I found this (in goog.dom.getElementsByTagNameAndClass_): if (opt_class) { var arrayLike = {}; var len = 0; for (var i = 0, el; el = els[i]; i++) { var className = el.className; // Check if className has a split function since SVG className does not. if (typeof className.s...

Trying to select radio button based on asp variable

Hi and thanks for your help, I am trying to select a radio button based on an ASP variable. This variable directly correlates to the value field of the radio button. Any ideas guys/gals? Thanks, Will ...

Mapping Math and Javascript

After extensive research and fun learning about Google's mapping api, I am building a digital antenna map application. At this point, the next step in the project plan is to build a memory-map replication of the google map that is locating digital tv stations based upon input from the user's address. So, I am using this math code to form...

MS AJAX Framework Outer Width/Height

Hello, In the MS AJAX framework, I see support for getting width/height of elements, but I was wondering if coming in the next release if anybody has seen support for inner/outer width/height. I know JQuery supports this, but I'm talking about MS AJAX only... Thanks. ...

Why does the execution of my jQuery event handlers result in the page scrolling back to the top?

I am running some JavaScript on my page. Whenever it catches an event that is attached to an anchor <a> element and executes the handler (which I've attached using jQuery) the scroll position resets back to the top of the page. Is there a solution? ...

How can I cause the browser to scroll an element horizontally to a pre-defined location without using JavaScript?

I'm working on 'timeline' project, where I have content inside of list items, in a horizontal unordered list. This is contained in a div, so you can scroll left to right through the content. My client would like buttons to 'goto' each era. I know this is easily achieved through JavaScript. However they also want this to be functional wi...

How Does Digg remove "&x=0&y=0" from their Search Results URL?

I'm using an image as the submit button for a search form, i.e.: <input id="search" type="image" alt="Search" src="/images/searchButton.png" name=""/> This has an unfortunate side effect in Chrome and Firefox--the parameters &x=0&y=0 appear on the end of the search results URL, for example if I search for "food" I am directed to the ...

Get mouse position based on where user clicks

I am trying to write a simple text editor in a browser. What I am currently stuck on is when a user clicks to change the mouse position, how can I get the index in the string of the new position? Example: User types: Hello World! My name is John. Currently cursor is after the period after John. What I would like to be able ...

How to set max-width of dijit.ToolTip?

I tried the following, but it didn't seem to work. var helpIcon = dojo.create("span", {"class":"help-icon", innerHTML:"[?]"}, td1); var tooltip = new dijit.Tooltip({ connectId: [helpIcon], label: "large paragraph of text here ... " }); tooltip._setStyleAttr("max-width: 100px"); Help! ...

What's wrong with this JavaScript code?

for(var i = 0, var p = ''; i < 5; i++) { p += i; } Based on a JavaScript book i'm reading, this is valid code. When I test it doesn't work, and in FireBug I get this error: SyntaxError: missing variable name ...

MooTools/JS: bindWithEvent

There's this piece in the codebase I'm working on: this.element.addEvent('click', this.clickEvent.bindWithEvent(this)); I want to change it so that the click event makes sure the window is loaded first. So I tried: var t = this; this.element.addEvent('click', function() { window.addEvent('load', function() { t.clickEvent....

Auto-reload of files in Node.js

Any ideas on how I could implement an auto-reload of files in node.js. I'm tired of restarting the server every time I change a file. Apparently Node.js' require() function does not reload files if they already have been required, so I need to do something like this: var sys = require('sys'), http = require('http'), pos...

Javascript Array Key Retrieval

My JavaScript code stores a lot of data in arrays. I want to retrieve a key using something similar to what I wrote below. It key that should be retrieved is based on variables that are page-dependent . The following code doesn't work. Can anyone give me a solution to this problem? This is part of a script that does automatic conjugatio...

jQuery table / list context menu

Hi all, I am looking for an intuitive js plug in for table rows. Something similar to Sharepoint list view, where when hovering over a table row the row gets highlighted and when clicking the row a context menu appears at a fixed position. I am developing in ASP.net and prefer jQuery since the plugins are always easy to use. Thanks i...

Advanced JavaScript split

I have to split this string here in JavaScript: hl=windows xp \"windows xp\" to three words. I used: keywords = keywords.split(/ /); But then i got 4 words: windows xp \"windows xp\" How could i split this string to just 3 words? EDIT: and how do i remove the \". ...