Sha256: 86a5b17e0fde6406d6371b96ae6b8dfae69e32e4a3b55f3bd887d1a01fd9f3d4
Contents?: true
Size: 1.63 KB
Versions: 4
Compression:
Stored size: 1.63 KB
Contents
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Form Handling</title> <style type="text/css" media="screen"> </style> <script src="../../vendor/jquery-1.4.1.min.js" type="text/javascript" charset="utf-8"></script> <script src="../../lib/sammy.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> // ;(function($) { var app = new Sammy.Application(function() { with(this) { debug = true; element_selector = '#main'; form_fields = null; get('#/', function() { with(this) { $element().text('Click form!'); }}); get('#/form', function() { with(this) { partial('files/form.html'); }}); post('#/pretend/post/url', function() { with(this) { form_fields = params; redirect('#/display'); }}); get('#/display', function() { with(this) { if (form_fields) { $element().html(form_fields.toHTML()); } else { redirect('#/form') } }}); }}); $(function() { app.run('#/'); }); // })(jQuery); </script> </head> <body> <div id="container"> <div id="main"> </div> <ul id="link"> <li><a href="#/form">Form!</a></li> <li><a href="#/">Back</a></li> </ul> </div> </body> </html>
Version data entries
4 entries across 4 versions & 1 rubygems