Reading value from text_field

Hi All,
I am new user of ruby and rails, and i am developing an application
using ruby and rails.
I am facing a problem in reading value of text_field in the same .rhtml
file. how i should i read text_field value and make comparison in my
.rhtml file(using ruby tag libs).
Thanx in advance.