Skip to content

Instantly share code, notes, and snippets.

@jormon
Created April 26, 2015 22:51
Show Gist options
  • Save jormon/b8ea02b4cf611c1830c0 to your computer and use it in GitHub Desktop.
Save jormon/b8ea02b4cf611c1830c0 to your computer and use it in GitHub Desktop.
Quickbooks Budgeting Import
javascript:var data = prompt("Please paste the row:");
var month_data = jQuery.map(data.split("\t"), function(elem) {
return Number(elem.trim()) * 1000;
});
var months = [
"jan",
"feb",
"mar",
"apr",
"may",
"jun",
"jul",
"aug",
"sep",
"oct",
"nov",
"dec",
];
var elems = jQuery('iframe#legacyframe').contents().find('iframe#bodyframe').contents().find('input.esect_field');
$.each(elems, function(index, input) {
input.value = month_data[months.indexOf(input.name)];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment