Syntax for checking a textbox is in inactive state

I am testing a webpage in which i shd chk for a textbox is incative or
not can any one tell me the syantax for it in ruby

thnx in advance

What does active/inactive mean? Do you mean blank?

Wow, a question with so much missing information. I am guessing:

(1) “Webpage” means “a HTML page containing a FORM element”?

(2) “chk” means “when the FORM arrives at my webserver, I want to take
action dependent on whether the checkbox is checked or not”?

(3) The server is running some web framework, I guess Rails?

In that case maybe what you want is:

def myaction
if params[:checkboxname]
render :text => “It was checked!”
render :text => “It was not checked!”

My guesses could be entirely off-base. For example, you might want to be
testing the checkbox state browser-side in Javascript. The moral is: if
you want a good answer, please make the effort to post a good question.

If you show your existing code (both the HTML template and the
controller action which handles it) you may get a more accurate answer.
But if it’s a Rails question, it would be better that you don’t post it
here, use a Rails mailing list instead.