Posts

Showing posts from November, 2009

Multiple Language implementation Using Google Translate

Hi, Just surfed through how to implement a multiple language App, & got this from google Translate.. Just add this code in your HTML Layout. <div id="google_translate_element"></div><script> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element'); } </script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> PTS: This works only inside the app, & not in a HTML file. Source : http://translate.google.com/translate_tools?hl=en Thanks, Srikanth

Multiple Select boxes in Js

Image
I have gone through many examples for multiple select like this. & what worked for me is i have given below, http://www.box.net/shared/9lo1g8p3ei Download the Js & Css from the above link. Create a HTML file like this, <script src="javascripts/moo.js" type="text/javascript"></script> <script src="javascripts/multi_transfer.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="stylesheets/multiple.css" /> <table> <tr> <td align="center"> <div class="holder" > <p>Exam List</p> <select multiple="multiple" id="select1" name="select1[]"> <option value="1">one1</option> <option value="2">one2</option> <option value="3">one3</option> <option value="4">one4</opt...

Add Favicon in a webpage

This is how we add Favicon in a webpage, <link rel="SHORTCUT ICON" href="/images/favicon.ico" type="image/x-icon"></span> Thanks, Srikanth

Adding GEM sources

sudo gem sources -a http://gems.github.com/ sudo gem sources -a http://gems.rubyonrails.org/

Action Web Service Gem

Image
hi i am using 'actionwebservice' for passing SOAP requests. Version 2.3.2 for actionwebservice is " datanoise-actionwebservice" For installing the gem when i used, gem install datanoise-actionwebservice got this error, ERROR: could not find gem datanoise-actionwebservice locally or in a repository & found this is the right way to install gem install datanoise-actionwebservice --source http://gems.github.com Add this line to your config/environment.rb file in the initializer section: config.gem 'datanoise-actionwebservice', :lib => 'actionwebservice' Generating API controller ActionWebService gem includes web_service generator that you can use like this: $ ./script/generate web_service post Define your API Open app/services/post_api.rb file and add methods that your service exposes: class PostApi [[:string]] end API implementation We are going to use direct dispatching mode, so all methods that implement our API go di...

Getting Next Existing Record in a DB

Wondered how to do it,, & did it Using offset: sql: SELECT * FROM foo WHERE id = 4 OFFSET 1