Never been to TextSnippets 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!)

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

PHP State-Array Generator

Simple array for HTML mockups.

function state_selection() {
        echo '';
}
state_selection();

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 } )
)  %>
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed