javascript

Flash-like visual effects in JS / jQuery

I know there are thousand of visual effects made in JS that can be found on Google. But most of that effects are useless in web-design, or are outdated like "clock following mouse cursor" :| Also I know sites like http://www.chromeexperiments.com and http://www.dhteumeuleu.com but those examples make web-browser uses 100% CPU power and m...

Issues with dojox.charting and xDomain reference to dojo/dojox library

I have a web HTML page with some client-side JS codes based on dojox.charting. I don't have dojo library in my local web site (actually no web server). I use dojos' xDomain reference feature with src to google's hosting site like this: <head> ... <script type="text/javascript" djConfig1="isDebug:true" src="http://ajax.go...

Javascript: Performance of .className Changes vs. .style Changes

Back in 2005, Quirksmode.com released this article: http://www.quirksmode.org/dom/classchange.html that showed "proof" that changing the style of an element by changing its class (ie. "elem.className = x") was almost twice as fast as changing its style via its style property (ie. "elem.style.someStyle = x"), except in Opera. As a resu...

What's the easiest way to parse the anchor out of the current page's location?

I need to the anchor out of a window.location in JavaScript, such as the following url: http://www.example.com/page.html#anchor1 What's the easiest method? ...

Call a javascript function after 5 sec of last key press

Hello, I have a form with an <input type=text /> and I want to call a javascript function after 5 seconds of the last key press, and every time a new key is pressed, this timer should reset and only call the function after 5 seconds. How can I do this? I'm using jQuery. thanks! ...

How do I combine the 'before' method with the 'fadeIn' method in jQuery?

I have a line of jquery that is inserting a div before another div that is already on the page using jQuery's before method: $("#sendEmail").before('<div id="response"><h1>Success</h1><p>Your email was sent.</p></div>'); I want the new div to fade in, so I tried to combine the methods in two different ways, but both did not work corre...

Good Editors for Web Development on OS X?

I'm getting started with web development on OS X need some good development tools, text editors...etc. I have XCode already but it doesn't seem geared towards editing the web technologies I will be using: xhtml, javascript, css, and php. So I am looking for some ideas. I know about TextMate, but am trying to avoid spending any $$$. Th...

how to read a global javascript variable from actionscript

Given that there is a global javascript variable on my web page named myVar, how can I access the value of the variable myVar from within my flash movie using javascript? I see plenty of examples of using external interface in order to execute javascript from actionscript, but I am unable to find examples of returning values back into t...

Declaring Multiple Variables in JavaScript

Hello, In JavaScript, it is possible to declare multiple variables like this: var variable1 = "Hello World!"; var variable2 = "Testing..."; var variable3 = 42; ...or like this: var variable1 = "Hello World!", variable2 = "Testing...", variable3 = 42; Is one method better/faster than the other? Thanks, Steve ...

How do i add Javascript to an ASP.NET MVC View?

Hi folks, simple question i'm sure (blush). I have a simple View and I wish to add a JQuery DatePicker javascript to this view (and not every view, via a masterpage). I'm not sure what is the best way to do this. Second, I'm conscience of where/when my Javascript loads. I'm a fan of YSlow and it recommends that i add any scripts to th...

Javascript token replace/append

Hi guys I have a string that looks something like the following 'test:1;hello:five;just:23'. With this string I need to be able to do the following. .... var test = MergeTokens('test:1;hello:five;just:23', 'yes:23;test:567'); ... The end result should be 'test:567;hello:five;just:23;yes:23' (note the exact order of the tokens is not ...

Firefox, wmode and fscommand

Hello, I'm using SWFObject to embed flash on my site. var so = new SWFObject("file.swf", "file", "100%", "100%", "8", "#FFFFFF"); so.addParam("wmode", "opaque"); so.addParam("allowscriptaccess", "always"); so.write(container); This works like a charm in all browsers as far I can tell, but I'm also using fscommand from flash, and thus ...

Dynamically Query a Database to check for value.

I need to check if a certain value "SheetNumber" is in my mysql database dynamically. I have seen it done on popular web sites and I am trying to find a good tutorial to outline it for me. I am fairly new to Javascript but i know a lot of PHP. I am anxious to learn how to do this. Chris ...

Can I control the web browser's loading icon?

Can I control the browser's loading state with JavaScript? I.e., I want the browser to display its native "loading" animation, not my own loading icon in the page, but the one that appears instead of the favicon while the browser is loading the page. ...

How do I add a property to a Javascript Object using a variable as the name?

I'm pulling items out of the DOM with JQuery and want to set a property on an object using the id of the DOM element. For example: obj = {}; jQuery(itemsFromDom).each(function() { element = jQuery(this); name = element.attr("id"); value = element.attr("value"); //Here's the problem obj.name = value; }); If "itemsFromDom" in...

ui Dialog works once in IE

Hi, I hope someone can help with this problem. I am using ui Dialog that pops up on clicking a link with the same class. The problem is that the link work great once but if i click it again or another link with the same class then only the overlay loads but not the content box in IE only. It works great in firefox. My script includes an ...

Is there a way to use jQuery.getScript inside the AIR application sandbox?

I 'm trying to build an AIR application using the HTML/JS engine (not flex nor flash), but I'm facing an issue while trying to load dynamically a JS file form the application directory. Once the application has launched, if I try to load a script using jQuery.getScript method, the script is never interpreted and no error is thrown. I've...

Events work in Firefox/Chrome but fail in IE

I've just built an SVG map of New Zealand for use with the excellent javascript library Raphael, but unfortunately have stumbled upon what I can only imagine is a bug or syntactic variation in IE's javascript interpreter. In Firefox and other browsers the onlick and onmouseover events work perfectly - however they do not fire in IE (tes...

which ajax script library do you recommend?

There are a lot of JavaScript libraries out there these days (extJs, Scriptaculous, Dojo, prototype, Solvent and many more). Couldn't find any site comparing cons and pros. Could anyone give recommendations? Things to consider: - size - performance - Cross-Platform - ease of use and documentation - (special reason to use a specific one ...

craigslist rss feed

I'm trying to parse the data from a craigslist rss feed. This is the feed url - http://www.craigslist.org/about/best/all/index.rss I'm using jfeed and my code is given below jQuery(function() { jQuery.getFeed({ url: 'proxy.php?url=http://www.craigslist.org/about/best/all/index.rss', success: function(feed) { ...