Skip to content

Instantly share code, notes, and snippets.

View schenkman's full-sized avatar

Chris Schenk schenkman

View GitHub Profile
@schenkman
schenkman / gist:1157190
Created August 19, 2011 16:03
Adding click event to button
var formNote = "";
formNote += "<div class='hs_note'>";
formNote += "<form id='note_edit_form' action='/accounts/" + account_class + "/" + account_id + "/"+noteAction+"' method='post' data-remote='true'>";
formNote += "<div style='margin:0;padding:0;display:inline'><input name='utf8' type='hidden' value='&#x2713;' /><input name='authenticity_token' type='hidden' value='"+$("meta[name=csrf-token]").attr("content")+"' /></div>";
formNote += "<input type='hidden' name='note[metric]' value='" + metric + "'>";
formNote += "<input type='hidden' name='note[date]' value='" + dateformat + "'>";
if(note_id!=undefined) {
formNote += "<input type='hidden' name='note[id]' value='" + note_id + "'>";
}
formNote += "<textarea name='note[content]' class='textNote' cols='32' rows='7'>"+note_text+"</textarea><br>";