javascript

Detecting when a div's height changes using jQuery

I've got a div that contains some content that's being added and removed dynamically, so its height is changing often. I also have a div that is absolutely positioned directly underneath with javascript, so unless I can detect when the height of the div changes, I can't reposition the div below it. So, how can I detect when the height o...

Detecting Back Button/Hash Change in URL

I just set up my new homepage at http://ritter.vg. I'm using jQuery, but very minimally. It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. //general functions function getUrl(u) { return u + '.html'; } function loadURL(u) { $.get(getUrl(u), function(r){ ...

Is there a simple JavaScript slider?

I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function? ...

2.9999999999999999 >> .5?

I heard that you could right-shift a number by .5 instead of using Math.floor(). I decided to check its limits to make sure that it was a suitable replacement, so I checked the following values and got the following results in Google Chrome: 2.5 >> .5 == 2; 2.9999 >> .5 == 2; 2.999999999999999 >> .5 == 2; // 15 9s 2.9999999999999999 >...

mootools or javascript : what does $tmp stand for or what does it pertain too

im currently working on the Tips.js from mootools library and my code breaks on the line that has those el.$tmp and console says its undefined can anybody help me? ...

How do you free a wrapped C++ object when associated Javascript object is garbage collected in V8?

V8's documentation explains how to create a Javascript object that wraps a C++ object. The Javascript object holds on to a pointer to a C++ object instance. My question is, let's say you create the C++ object on the heap, how can you get a notification when the Javascript object is collected by the gc, so you can free the heap allocated ...

Calling JS from Applet: MalformedURLException: unknown protocol: javascript

Hey guys. I read that you could call JavaScript code from a Java Applet by calling JApplet.getAppletContext().showDocument( "javascript:alert('Hello World');" ); However, when I do this i get the following error: java.net.MalformedURLException: unknown protocol: javascript How do I work around this? ...

JavaScript, inputstream and DIB?

Hi all, Is there any useful way to load DIB into inputstream and get a handle to it and all that in JavaScript (js) ? ...

Showing a loader while Spry XMLDataset loads the data

i am using Spry (SpryData.js,xpath.js) var ds1 = new Spry.Data.XMLDataSet("_db/db.xml", "bildiriler/bildiri",{useCache:false}); // load the xml tree .... <!-- use it in a loop - Sometimes the page use "ds1.loadData();" to refresh the data --> <div spry:region="ds1" spry:repeatchildren="ds1"> <a href="#">{author}</a></div> ...

ParseFloat function in JavaScript

When i am adding two text boxes values that are 1.oo1 and 0.001 and then i do a parsefloat i get 1.0019999999. I want it 1.002 . Can u help me? ...

HTML newspaper columns

I'm trying to create newspaper style columns using a block of text. I would like the text to be evenly spread out across 2 columns which could react to change of length in the text. Is this possible using just HTML/CSS, if not could javascript be used? Thanks ...

Is it worth converting my functional JavaScript code to an object-oriented design?

I'm currently building a small web application that includes a fair amount of JavaScript. When I was prototyping the initial idea, I just hacked together a few functions to demonstrate how the application would eventually behave intending to go forward re-writing the JavaScript in an object-oriented nature. Now that I'm getting into the...

How do you trigger javascript functions from flash?

How do you trigger a javascript function using actionscript in flash? The goal is to trigger jQuery functionality from a flash movie ...

Google Maps Overlays

I'm trying to find something, preferably F/OSS, that can generate a Google Maps overlay from KML and/or KMZ data. We've got an event site we're working on that needed to accommodate ~16,000 place markers last year and will likely have at least that many again this year. Last year, the company that had done the site just fed the KML data...

Should I create a JQuery server control for ASP.net to best use it in my apps?

I have been rather successful in promoting JQuery within my organization. No small feat on it's own. However, one of the ideas being kicked around here to make it part of our app is to create an ASP.net server side control. (We are going to be sticking with WebForms for the foreseeable future.) I'm not too wild about this approach as it...

Checking to see if a DOM element has focus.

I've got a lightbox textbox that is displayed using an AJAX call from an ASP.NET UpdatePanel. When the lightbox is displayed, I use the focus() method of a textbox that is in the lightbox to bring focus to the textbox right away. When in Firefox, the text box gains focus with no problem. In IE, the text box does not gain focus unless I ...

Any PHP -> jQuery libraries out there?

Have any bridge libraries been developed for PHP that provide access to the jQuery framework? Ideally it would be nice to have something fairly extensible so that creating jQuery-based content using PHP code would be fairly easy and customizeable. Does such a thing exist yet? ...

Get a handle on event listening in JavaScript

Last week we released Omniture's analytics code onto a large volume of web sites after tinkering and testing for the last week or so. On almost all of our site templates, it works just fine. In a few scattered, unpredictable situations, there is a crippling, browser-crashing experience that may turn away some users. We're not able to s...

Which JavaScript libraries will handle popout windows (i.e. like Meebo or Gmail chat windows)?

I could write this, but before I do, I wanted to check to see if there are existing solutions out there since it seems a lot of websites already do this, so I was wondering if there was a quick way to do this. Also, I am talking about "popout" windows, not "popup" windows. All JavaScript libraries support "popup" windows, but I want on...

How to Show Ballon tooltip when mouse stops

[edit] So I used one of the javascript tooltips suggested below. I got the tips to show when you stop and hide if you move. The only problem is it works when I do this: document.onmousemove = (function() { var onmousestop = function() { Tip('Click to search here'); document.getElementById('MyDiv').onmousemove = fun...