Skip to content

Instantly share code, notes, and snippets.

@thepsion5
thepsion5 / Model.js
Created January 13, 2017 16:07
Legacy Javascript from a SPA written in 2007
//Vintage Jquery 1.3
$.post("DataFiles/Registration.ashx",
{
//Actual values sent to the server are formatted are broken into 3 segments, separated by a tilde
//The first is the type to which the value should be cast at the server, the second the actual value
//The third segment, "fin" specifies the server should not validate or update those fields
//We have the best code. Tremendous code, people tell me all the time.
new_ncoqfrname: $("#txtRegNo").attr("type") + "~" + $("#txtRegNo").val() + "~fin",
new_federalidfein: $("#new_federalidfein").attr("type") + "~" + $("#new_federalidfein").val() + "~fin",
new_ncoqfrfinancialperiodstartdate: "datetime" + "~" + $("#new_ncoqfrfinancialperiodstartdate").val() + "~fin",