Hi list,
I am new to rubyonrails any help is very appreciated.
In my view I have two radio buttons and based on their value I need to 
invoke different part of the same view.
I wonder how can I check the if these raido buttons were selected.
I think I need to use "event observer" and "ajax" but I can
not make it
works.
so far I have this:
<input type="radio" name="view" value="1"
id="list" checked = "checked">
<input type="radio" name="view" value="0"
id="matrix" >
<script language="javascript" type="text/javascript"
src="prototype.js">
		Event.observe("list", "click", function(){
        chkShowItem("list"); })
</script>
<script language="javascript" type="text/javascript"
src="prototype.js">
		Event.observe("matrix", "click", function(){
       chkShowItem("matrix"); })
</script>
and in public/javascripts/application.js
function chkShowItem($sChk){
if($sChk == true )
return 0;
else
return 1;
}
However I don''t know how to check the value that is returned by 
chkShowItem or even if this is the correct approach.
Thanks
-- 
Posted via http://www.ruby-forum.com/.