How can my iPhone Objective-C code get notified of Javascript errors in a UIWebView?

I have now found one way using the script debugger hooks in WebView (note, NOT UIWebView). I first had to subclass UIWebView and add a method like this: – (void)webView:(id)webView windowScriptObjectAvailable:(id)newWindowScriptObject { // save these goodies windowScriptObject = newWindowScriptObject; privateWebView = webView; if (scriptDebuggingEnabled) { [webView setScriptDebugDelegate:[[YourScriptDebugDelegate alloc] init]]; } } Next you should create … Read more

How do I add a margin to a CSS webkit scrollbar? [closed]

There’s yet another solution which might fit easily in everybody’s project. If you use a transparent border as a margin and a box-shadow with inset to set it’s color, you’d get the result you are hoping for. For instance: ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { box-shadow: inset 0 0 10px 10px green; border: solid … Read more

CSS transition not working for percentage height?

The (pure CSS) solution so far If you leave height:auto; and use fixed values of max-height you can simulate a transition: .details-expanded { max-height: 300px; /* try to guess a max-height for your content */ } .details-collapsed { height: auto; max-height: 0; transition: max-height 500ms linear; /* pick a proportional duration */ } Pay attention … Read more

Getting BLOB data from XHR request

Don’t use BlobBuilder in Chrome (tested in OSX Chrome, Firefox 12, Safari 6, iOS Chrome, iOS Safari): ex1 : http://jsfiddle.net/malraux/xGUsu/ (principle) ex2: http://jsfiddle.net/xGUsu/78/ (working with full example) var xhr = new XMLHttpRequest(); xhr.open(‘GET’, ‘doodle.png’, true); xhr.responseType=”arraybuffer”; // Process the response when the request is ready. xhr.onload = function(e) { if (this.status == 200) { // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)