javascript

Make Browser Window Blink in Task Bar

How do I make a user's browser blink/flash/highlight in the task bar using JavaScript? For example, if I make an AJAX request every 10 seconds to see if the user has any new messages on the server, I want the user to know it right away, even if he is using another application at the time. Edit: These users do want to be distracted when ...

Event handling in Dojo

Hello All: Apologies in advance for the appaling long post (and pretty applaing code, too). Taking Jeff Atwood's advice, I decided to use a JavaScript library for the very basic to-do list application I'm writing. I picked the Dojo toolkit, version 1.1.1. At first, all was fine: the drag-and-drop code I wrote worked first time, you can ...

replace URL with HTML Links javascript

i am using the next function to match urls inside a given text and replace them for html links. The regex is working great but currently i am only replacing the first match. Does anyone knows how I can replace all the url? I guess i should be using exec command but i did not really figured how to do it. function replaceURLWithHTMLLinks...

How can I make flash cs3, actionscript send events to javascript?

I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing. What is the best way to do that in Flash CS3 using Actionscript 3.0 ? ...

Two-way password encryption without ssl

I am using the twitter API to integrate twitter with my blog's commenting system. The problem with the twitter API and many other web APIs out there is that they require the user's username and password to do anything useful. I don't want to deal with the hassle and cost of installing a SSL certificate, but I also don't want passwords ...

Can I stop .NET eating IDs?

I'm an Information Architect and JavaScript developer by trade nowadays, but recently I've been getting back into back-end coding again. And, whilst trying to get an HTML prototype integrated and working with our C#-based CMS, I've come to blows with our programmers over the HTML ID attributes being arbitrarily rewritten by .NET for for...

Javascript Best Practices

What are some good resources to learn best practices for Javascript? I'm mainly concerned about when something should be an object vs. when it should just be tracked in the DOM. Also I would like to better learn how to organize my code so it's easy to unit test. ...

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? ...

javascript locals()?

In python one can get a dictionary of all local and global variables in the current scope with the built-in functions locals() and globals(). Is there some equivalent way of doing this in javascript? For instance, I would like to do something like the following: var foo = function(){ alert('foo'); }; var bar = function(){ alert('bar')...

Security implications of multi-threaded javascript

Reading through this question on multi-threaded javascript, I was wondering if there would be any security implications in allowing javascript to spawn mutliple threads. For example, would there be a risk of a malicious script repeatedly spawning thread after thread in an attempt to overwhelm the operating system or interpreter and trig...

Can the same Adobe AIR app run more than once?

As the title says, is there a way to run the same Adobe AIR app more than once? I have a little widget I wrote that shows thumbnails from a couple of photo streams, and I'd like to fix it so I can look at more than one stream at a time. Thanks! ...

Reading from a http-get presenting in Firefox bookmarks

I'm trying to get a Firefox plugin to read data from a HTTP get, parse the results and present them as links in a bookmark-like drop-down menu. My quesion then is: Does anyone have any sample code that will do this? ...

Why do I cannot jQuery my page under Internet Explorer

Hello. I have very strange problem. Under some elusive circumstances I fail to apply any jQuery selector on my pages under IE. It's OK under Firefox though. jQuery function simply returns empty array. Any suggestions? Page is too complex to post it here. Practically any selector except #id -ones retur zero element array. jQuery versio...

Simple Ajax/PHP contact form with validation

Does anyone know of a complete Ajax/PHP contact form that includes error handling/form validation and requires minimum effort to setup? It must also still function in cases where JavaScript is disabled. I'm pretty much looking for a plug and play solution (well, as close to it as possible). ...

How to check if page is postback within reserved function pageLoad on ASP.NET AJAX

I'm looking for a way to check within pageLoad() if this method is raised during load event because of a postback/async postback or because of being loaded and access the first time. This is similar to Page.IsPostback property within code behind page. TIA, Ricky ...

Should I use window.onload or script block?

I have a javascript function that manipulates the DOM when it is called (adds CSS classes, etc). This is invoked when the user changes some values in a form. When the document is first loading, I want to invoke this function to prepare the initial state (which is simpler in this case than setting up the DOM from the server side to the ...

Is Google Chrome's V8 engine really that good?

Did anyone have time to take a look at it? I've read a bit and it promises a lot, if it's half what they say, it'll change web programming a lot ...

What's a good bit of JS or JQuery for horizontally scrolling news ticker

Hi, I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list. The produced HTML needs to be standards compliant as well. I have tried liScroll but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially with longer lists. I ...

Javascript spinning wait hourglass-type thing

I'd like to indicate to the user of a web app that a long-running task is being performed. Once upon a time, this concept would have been communicated to the user by displaying an hourglass. Nowadays, it seems to be an animated spinning circle. (e.g., when you are loading a new tab in Firefox, or booting in Mac OS X. Coincidentally, the...

Can you use the JavaScript engine in web browsers to process local files?

I have a number of users with multi-megabyte files that need to be processed before they can be uploaded. I am trying to find a way to do this without having to install any executable software on their machines. If every machine shipped with, say, Python it would be easy. I could have a Python script do everything. The only scripting l...