From: Brian Candler Date: 2009-08-21T23:52:55+09:00 Subject: Re: syntax for checking a textbox is in inactive state 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!" else render :text => "It was not checked!" end end 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. See http://www.catb.org/~esr/faqs/smart-questions.html#intro 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. Regards, Brian. -- Posted via http://www.ruby-forum.com/.