Skip to content
Advertisement

iPhone vs Javascript event suppression

I’ve got a simple click handler that does something on the screen instead of visiting that link. Here’s the code (I’m cutting out the nonsense but the important stuff is accurate): This works fine on proper browsers. It works fine on Android (both older webkit and newer Chrome builds) and it works fine on iOS on the iPad 2… But

financial rate function in javascript not working properly

the function given at simple financial rate function in javascript is not giving me same answers as excel rate function some time. It works perfectly for the problem given at http://allfinancialmatters.com/2009/11/03/how-to-use-the-rate-function-in-excel/ but for my test cases. its results are different from excel rate. this is strange behaviour. i am unable to sort this out. my test cases (with excel output)

How does Google Closure Compiler handle quotes (string literals)?

The question ‘How does Google Closure Compiler handle quotes (string literals)?’ could also be re-phrased like: Why does Closure replace/swap single quotes with double quotes? How does Closure decide what quote- formatting/style to use? (How) can I change this (default) behavior? Note 1: this question is not about why Closure (or some other minifiers) have chosen to prefer double quotes

Regex to match accept-language header

I am trying to match the following accept-language header field of a http request. The problem is in the last line. It should imho yield: What is wrong with my regex? Answer Your first capturing group matches everything that doesn’t contain dashes and stops at a dash -. In your last string you have no dash, so it matches the

Advertisement