Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Aaron http://www.stocad.com

1 total

Active Selection Box (drop down) examples

// description of your code here

<%= select_tag( :saction, options_for_select([["Actions:",0],["Edit",1],["Delete",2]],0),
				:onchange => "if(confirm('Are you sure?  This will effect all products checked below.')) products_form.submit(); else products_form.saction.value = 0;")%>


<%= select_tag( :sort_by, options_for_select([["Sort by:",0],["Name",'name'],["Price",'price'], ["Date Listed",'id']],0),
				:onchange => remote_function( 	:with => "'sort_by='+$(\"sort_by\").value",
												:loading => "false;",
:url => { :controller => 'products', :action => :change_order } )
)  %>
1 total