Skip to content

Author: admin@master

Safari Javascript Date() NaN Issue (yyyy-MM-dd HH:mm:ss)

My code is working properly in Google Chrome, but not in Safari. I figured out that I need to convert yyyy-MM-dd HH:mm:ss to ISO 8601, but I didn’t found a solution to do this. Online Test Link: http://jsfiddle.net/UVgHR/ Javascript: HTML Example: Answer To make your question easier your problem is with…

Onclick function based on element id

I’m working on a site with a visualization of inheritance relation. I try to link each nodebox with specific URLs. The html of Element looks like this: I used and also Neither of them can find the element, nor setup the onclick function. Have I misunderstood anything? Any information will be helpful. Th…

Internet Explorer 11 detection

I know IE 11 has different user agent string than all other IE I have tried to detect IE 11 with answer specified for this question’ Jquery fail to detect IE 11 Thats !!navigator.userAgent.match(/Trident/7./) But I am getting error Object not found and needs to be re-evaluated. Then I openede developer …

WebSQL syntax on IndexedDb

I have an application that use WebSQL. I want to support IndexedDB too (For Browsers without WebSql support). Is there any libary that use sql-syntax but works with indexedDB / LocalStorage in …

regexp to allow only one space in between words

I’m trying to write a regular expression to remove white spaces from just the beginning of the word, not after, and only a single space after the word. Used RegExp: Test Exapmle: Only one space should be allowed. Is it possible? Answer BTW, new RegExp(..) is redundant if you use regular expression liter…