Projax: PHP Generators for Prototype and Script.aculo.us

Projax is a port of the Rails helpers that wrap the JavaScript required for Prototype and Script.aculo.us code from Ruby, to PHP classes. Getting Started
$projax = new Projax();Please enter your year of birth : <?=$projax->text_field_with_auto_complete('dob',null,array('url'=>'index.php?task=ajax'));?> for($i=1900;$i<2006;$i++)$ret_val.=(strstr($i,$_POST['dob']))?'<li>'.$i.'</li>':''; echo '<ul>'.$ret_val.'</ul>';
The User Guide details the available functions: JavaScript Helpers
  • button_to_function($name,$function=null)
  • link_to_function($name,$function,$html_options=null)
  • tag($content)
  • escape($javascript)
Prototype Helpers
  • evaluate_remote_response()
  • form_remote_tag($options)
  • link_to_remote($name,$function,$html_options=null)
  • observe_field($field_id,$options =null)
  • observe_form($form,$options=null)
  • periodically_call_remote($options=null)
  • remote_function($options)
  • submit_to_remote($name,$value,$options=null)
  • dump($javascript)
  • ID($id,$extend=null)
  • alert($message)
  • assign($variable,$value)
  • ...
Script.aculo.us Helpers
  • dragable_element($element_id,$options=null)
  • drop_receiving_element($element_id,$options=null)
  • sortable_element($element_id,$options=null)
  • visual_effect($name,$element_id=false,$js_options=null)
  • auto_complete_field($field_id,$options=null)
  • in_place_editor($field_id,$options=null)
Some of these look a tad overkill? :)

Zero. Zilch. Nada. None. No commento.

Feel free to leave related comments here!

Rather Leave A Voice Comment?

Feel free to leave voice comments here!

Social Bookmarking

del.icio.us:Projax: PHP Generators for Prototype and Script.aculo.us digg:Projax: PHP Generators for Prototype and Script.aculo.us spurl:Projax: PHP Generators for Prototype and Script.aculo.us furl:Projax: PHP Generators for Prototype and Script.aculo.us Y!:Projax: PHP Generators for Prototype and Script.aculo.us

Leave a comment

The most recent replies are displayed at the top. Please comment accordingly. Your name and email are required. Track comments via RSS.

Next Generation Ecommerce Software & Web Store Platform > Fast, Simple, Friendly Stores
RSS
Stores  Features  Blog  Archives  About  Contact       © 2006 Web 2.0 Stores