Skip to content

Instantly share code, notes, and snippets.

@jraines
Created April 3, 2009 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jraines/89576 to your computer and use it in GitHub Desktop.
Save jraines/89576 to your computer and use it in GitHub Desktop.
:javascript
// wait for the DOM to be loaded
$(document).ready(function() {
var options = {
target: '#output'
};
// bind 'myForm' and provide a simple callback function
$('#myForm').ajaxForm(options);
});
.main
%form{:id => 'myForm', :action => 'handle', :method => 'post'}
="Link"
%br
%input{:type => 'text', :name => 'link'}
%br
%br
="Affiliate Link"
%br
%input{:type => 'text', :name => 'afflink'}
%br
%br
="Affiliate Link Anchor Text"
%br
%input{:type => 'text', :name => 'afflink_anchor'}
%br
%br
%input{:type => 'submit', :name => 'submit'}
%br
%br
#output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment