Posts Tagged ‘howto’

following is a JavaScript code snippet using Powerful JQuery library for dealing with select HTML tag (which is – by the way – pain to deal with core javascript language).

the html code


<select id=”my-ml-list” name=”my-ml-list”>

<option value=”java”>XML</option>

<option value=”java”>HTML</option>

<option value=”java”>XHTML</option>

<option value=”java”>HAML</option>

<option value=”java”>YAML</option>

<option value=”java”>YASL</option>



what can jquery do for you with this list, some is follow:

iterate on all elements

<script language=”javascript”>

$(“my-ml-list option”).each (

function () {

// this object is the current option HTML object.

alert(“current option value is: ” + this.value); // show message of it’s value.





Read Full Post »

This is a busy developer tutorial that walk through installing ruby on rails on Linux Machine.

get Downloads ready

  • type yum install ruby rdoc irb
  • Rubygems from http://www.rubyonrails.com/down
    • unzip the package.
    • type ruby setup.rb
  • type gem update
  • type gem install rails –include-dependencies
  • choose your lovely database: we will be using mysql for this tutorial; so, that requires us to install mysql
    • type yum install mysql mysql-server mysql-devel
    • type gem install mysql
      if you got some error of compiling native blah blah … the check you have GCC installed, and you may use some options like the following:
      gem install mysql — –with-mysql-include=/usr/include/mysql –with-mysql-lib=/usr/lib/mysql

Testing your installation

  • go to path of your choose.
  • type rails <your project name> you will notice a new folder created. cd it!
  • type ./script/server and go to your browser http://localhost:3000 ; if you see RoR welcome page. then you are there. Congratulations.

Read Full Post »