javascript

Does jQuery or JavaScript have the concept of classes and objects?

I found the following code somewhere, but I am not understanding the code properly. ArticleVote.submitVote('no');return false; Is ArticleVote a class and submitVote() a function of that class? Or what does the above code mean? And is there any concept of classes and objects in jQuery or in traditional JavaScript? How to create them?...

Tracking user actions - analytics for applications

I'm closing in on finishing a Windows Desktop Gadget that downloads plugins from my web server. I'm wondering how I can track the use of these plugins for reporting purposes like seeing which plugins are popular in which countries, how many times a plugin is used per day/month/week and other stuff like that. Logging this on every user ...

Javascript framework that primarily provides just document/onready functionality

A couple of months ago I was doing Javascript programming on the Facebook platform, on which the major frameworks such as Dojo, ExtJS, jQuery, Prototype, etc. don't necessarily work. Which led me to discovering a couple of frameworks that merely provide the CSS selection functionality, for possible porting, namely Sizzle (used inside jQ...

How can I check if user passes a valid date in javascript?

I have a javascript function that checks for a date range. Is there any way to check if a user has input a valid date in a textbox, regardless of format? function checkEnteredDate() { var inputDate = document.getElementById('txtDate'); //if statement to check for valid date var formatDate = new Da...

JavaScript to gather visitor information/stats.

I am looking for a piece of code, or even a list of all browsers' properties JavaScript can access so I can prepare my own stats system. I'm not looking for anything that server-side parser can get (e.g. Agent, referrer, etc.). I am not interested in external solutions like Google Analytics. The reason for this is that I want to run i...

is there an online javaScript code snippets resource that lets you run code?

is there an online javaScript code snippets resource that lets you run code? this would especially be useful for example code when trying to answer questions on SO! thanks, Josh ...

Populate Tabular Report (Multiple Records) with particular Values

Hi, I have a tabular report that allows the user to enter a reference no. (text item) as well as a comment textarea item. The report can vary in amount of records displayed but for this example, lets say I have 10 records in the report. What I am after but unsure how to do, is to create two new fields identifying both comment and refe...

How do I get number of fields in JavaScript object?

I'm trying to use JavaScript object as an associative array and everything was well until I needed to get number of entries that are stored in it. What is the easiest and most elegant way to do that? All I can think of is to run for each loop or jQuery $.each function and just see how much iterations it would do but that looks like an an...

telerik asp.net controls clear client-side

Hi I'm using telerik rad controls for asp.net I have to clear the inputs with javascript; but telerik controls (radcombobox e.g.) generates a huge markup so how to clear telerik controls on a page in client-side? thnx ...

suggestion regarding my "question of the week" project

Hi, everyone! I am going to start on a new project for my school. I have to create a "question of the week" forum, where the members can post questions and their questions could then be voted by other members. The best question of that week will be discussed the week after, and the posting of the questions will take place again. I am ...

Simulate loading on localhost

I have a site which uses AJAX and preloaders. Now I would like to see the impact of these preoloaders before deploying the site online. The "problem" is that localhost doesn't have loading time and the response is immediate, so that I can't see my preloaders. How can I simulate loading or limited bandwidth (with Firefox, Rails or whate...

How to capture submit form response "different domain"?

I have a case where i want to submit a form and get the response from this submit, because based on this response "at least submit complete response" i will make some other logic. What makes my case is different that this form is on a domain and i am submitting it to another domain name so can't use ajax submit due to cross script secur...

Form builder like Zend_Form_Html or ExtJS Form for JQuery

I was wondering if there is a JavaScript based HTML Form builder, similar to what you can do with Zend_Form_Html or with the ExtJS Forms but based on JQuery? There are several form related plugins but you still have to code every form manually. The idea is, that I usually only want to edit/add single entities from my Domain Model (e.g. i...

jQuery: Pass variable to :eq() does not work

I have been trying to find out why the following lines of code do not work: $('#add-cloud > select').change(function() { var selected = parseInt($('#add-cloud select option:selected').val()); $("#cloud-calculator table tr:eq(selected)").css("color", "red"); }); If I change :eq(selected) to :eq(4) for example - works fine. How do...

Using the geolocation API to set a form input.

I'm kind of a javascript noob, and I'm trying to use the new geolocation API in Firefox 3.5 to get an estimation of the user's coordinates and put that into a text box in a form. What I have doesn't seem to be working; it seems like the boxes are filled before the location is actually retreived. Here's what I have so far: <html> <head> ...

How does Bing.com create enlarged thumbnails?

When I search images using Bing.com, I realize their images are well cropped and sorted. When you place your mouse on an image, another window will pop up with an enlarged image. http://www.bing.com/images/search?q=Heros&amp;FORM=BIFD# I want to do the same thing in my program. I checked the source code of their page. They are using ja...

Asp.net modalPopupExtender repositioning

Hi there, By default, when using a modalPopupExtender from the ajaxControlToolkit - it is repositioned in the centre of the browser when the browser window is resized. I'm guessing this is some kind of javascript hooked into a window.resize method? I am altering the size of the panel associated with the extender, which puts the popup...

Running javascript standalone engine?

Bit of a strange question here i know. but i wanted to know if some kind of standalone engine for javascript exists.. basically i want to test running of my javascript without having to load a web page... Maybe it doesn't exist? Like some kind of ide where i can run commands directly without launching IE etc... I have a great editor ...

Change reference point when rotating image in IE using MatrixFilter

I've found that you can rotate an image in IE using the MatrixFilter, examples can be found on MSDN but the rotation point seems to move about as you increase the angle. ...

Help understanding jQuery button enable/disable code

I grabbed this code form JCarousel and just trying to understand these lines below. I'm new to jQuery and not that great at JavaScript so I am not sure what is jQuery and which is JavaScript below this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent, this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarouse...