javascript

Whats the algorithm to calculate aspect ratio? I need an output like: 4:3, 16:9

I plan to use it with javascript to crop an image to fit the entire window. I appreciate all help you can provide. Edit: I'll be using a 3rd part component that only accepts the aspect ratio in the format like: 4:3, 16:9 ...

Responding to address bar key events in Firefox Add-on

I want to write a Firefox addon that could get the content of the address bar in real time, for example this addon will change every "a" to "A" just as the user pressed "a". The problem is that I couldn't find any way to do that in Javascript, is there a way to do it (getting the address bar content in real time)? ...

Good resource to learn BDD, TDD (ruby , C#, javascript)

What are the good resource to learn BDD & TDD (ruby , C#, javascript). What are the good framework using now? ...

How can I ask JavaScript to hide an element ONLY IF it can be found?

I have a javascript event handler in one of my SSI files that hides a bunch of elements that may or may not appear on the page that calls the SSI file. As a result, the handler goes smoothly until it cannot find the element I'm asking it to hide and then stops before completing whatever may be left to hide. So, how can I get JavaScript t...

Multiple instances of TinyMCE in different forms with same name (jQuery).

I'm trying to implement an autosave feature that submits several different forms on a page with the same name with TinyMCE'd textareas. My code: function autoSaveEditForms() { $("#auto_save_notify").html("Saving..."); $("#auto_save_notify").show(); $("form[name=editForm]").each(function() { if($('input[name="question"]', this).val(...

How does google calendar print work?

I'm building a calendar in ASP.NET using Jquery, And I'm trying to implement Print. I can print simple html or images with no problem. But I can't figure out how to build a print like google calendar print. When you press Print in "Calendar Print Preview" the print dialog that pops up has more options (cross browsers), Some how this pri...

Improving performance of jquery/javascript webpage logic.

Hi, EDIT: I am also after advice if there is a better way to go about this?? I have a webpage that displays a timesheet for the user to fill out. The timesheet is for a month so it has as many rows in the month and also 5 columns of data, Normal hours, extended hours, shift hours holidays hours and total. I have a dropdown list that a...

Make javascript file to min version

Possible Duplicates: How to organize minification and packaging of css and js files to speed up website? What do you use to minimize and compress JavaScript libraries? Hi there Do you know any tool/method which can help me to minimize the size of a javascript file? ...

How can I see what verison of javascript does my browser use ?

How can I see what verison of javascript does my browser use ? ...

keep flash music player across page refresh/change

Hi all! I am trying to have a flash-based music player on my page which continues playing a song even when you refresh or go to another page within the web site. I whant do this like facebook footer i read this topic http://stackoverflow.com/questions/668431/how-does-facebook-keep-the-header-and-footer-fixed-while-loading-a-differe...

Show Html Elements above other Elements on MouseOver using Javascript

On this page in Espn.com, if you go to the upper right corner and hover over "myESPN", an inline popup window (if that is what it can be called) appears (in such a way that it looks connected to the initial button) and allows the user to log in to the site. In the html it looks like there is a hidden div that is made visible and is pus...

How to print pretty xml in javascript?

What's the best way to pretty-print xml in JavaScript? I obtain xml content through ajax call and before displaying this request in textarea i want to format it so it looks nice to the eye :) ...

Javascript array difference

Is there a way to return the difference between two array in Javascript? For example: array1 = "test1", "test2","test3", "test4" array2 = "test1", "test2","test3","test4", "test5", "test6" new array = test5, test6 Any advice greatly appreciated. ...

Zomm effect for a modal boxes

Hey guys, please are there any code to make a zoom effect in div pop-up but without js frameworks (pure javascript) like : bumpbox Cheers, ...

Javascript XMLHttpRequest issue

Hello everyone, I am using the following script to monitor whether I can connect to a web site in a regular interval (10 seconds in my sample code). I met with two issues, any ideas how to solve them? If a web site is very slow and no response within 10 seconds (making PingWebSite not return), I find 2 second call to PingWebSite will ...

Dynamically reveal hidden divs

Hi, I have searched hi and low for a solution for this, basicly I would like a panel with a plus sign next to it and when the user clicks the plus the blank version of form 1 is replicated in a new panel that gets revealed after clicking the + sign: ______________________________ |    Form 1    | |                   | |                ...

Finding date by subtracting X number of days from a particular date in Javascript

Hi All, I want to find date by subtracting X number of days from a particular date in JavaScript. My JavaScript function accepts 2 parameters. One is the date value and the other is the number of days that needs to be subtracted. For example, I pass my argument date as 27 July 2009 and i pass my other argument as 3. So i want to ca...

Dynamically loading a SWF into ShadowBox

FYI, ShadowBox is a javscript media viewer/lightbox. http://www.shadowbox-js.com/ Running into an issue when trying to dynamically load SWFs into my ShadowBox. My script outputs the following HTML: <div id="LightBoxItemList"> <a href="Images/large01.jpg" rel="shadowbox[Mixed];" class="First" /> <a href="Images/Hydro_Sample.swf" rel...

Use both jQuery.checkbox & jQuery.field

Hi, thank you for your time. I am trying to use 2 Jquery solutions on the one form, but I am unable to get the desired result after working on it for several hours. The first jquery solution enables a better look and feel http://www.envirotalk.com.au/jquery/jquery-checkbox.htm The second jquery solution enables a limit to be set on t...

jQuery masonry plugin - Have trouble getting the divs to stack properly in IE7

Hi all! I have a problem with the Masonry plugin to jQuery. If you take a look at this link: http://iloveinternet.org/kunder/omk/ and scrolls down to the brown field with a pink line on top. Can you see the div boxes there? They are supposed to be stacked next to eachother in rows of three with the masonry plugin. This works fine in m...