www.myowndb.com - javascript http://www.myowndb.com/taxonomy/term/34/0 en Fault tolerant loading remote javascript with YUI http://www.myowndb.com/node/67 <p>The <a href="http://app.myowndb.com/app/authentication/signup">registration form</a> of the MyOwnDB app was simplified this week, but an information I wanted to keep is the country where registered people are located, notably to know which translation of the UI to provide next (currently, it looks like it will be spanish).</p> <p>I decided to use the Geoplugin.com service, but it appears it's unreachable at this time, making for a less than engaging experience when loading the sign-up page.</p> <p><a href="http://www.myowndb.com/node/67" target="_blank">read more</a></p> http://www.myowndb.com/node/67#comments howto javascript javascript yui Mon, 05 Apr 2010 13:49:59 +0000 rb 67 at http://www.myowndb.com Using rails' escape_javascript outside of views http://www.myowndb.com/node/63 <p><a href="http://www.rubyonrails.com">Rails</a> provides a handy function to escape string to be used in your javascript code. Unfortunately, it is only available in your views. It is very easy though to make it available outside of views, eg in your helpers, as it suffices to require and include one module:</p> <pre class="brush:ruby"> require 'action_view/helpers/javascript_helper' include ActionView::Helpers::JavaScriptHelper # escape_javascript is available here. </pre><p><a href="http://www.myowndb.com/node/63" target="_blank">read more</a></p> http://www.myowndb.com/node/63#comments javascript rails Tue, 16 Mar 2010 16:22:45 +0000 rb 63 at http://www.myowndb.com