ction(data) { var fn = options.replaceTarget ? 'replaceWith' : 'html'; $(options.target)[fn](data).each(oldSuccess, arguments); }); } else if (options.success) { callbacks.push(options.success); } options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg var context = options.context || options; // jQuery 1.4+ supports scope context for (var i=0, max=callbacks.length; i < max; i++) { callbacks[i].apply(context, [data, status, xhr || $form, $form]); } }; // are there files to upload? var fileInputs = $('input:file', this).length > 0; var mp = 'multipart/form-data'; var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); // options.iframe allows user to force iframe mode // 06-NOV-09: now defaulting to iframe mode if file input is detected if (options.iframe !== false && (fileInputs || options.iframe || multipart)) { // hack to fix Safari hang (thanks to Tim Molendijk for this) // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d if (options.closeKeepAlive) { $.get(options.closeKeepAlive, fileUpload); } else { fileUpload(); } } else { $.ajax(options); } // fire 'notify' event this.trigger('form-submit-notify', [this, options]); return this; // private function for handling file uploads (hat tip to YAHOO!) function fileUpload() { var form = $form[0]; if ($(':input[name=submit],:input[id=submit]', form).length) { // if there is an input with a name or id of 'submit' then we won't be // able to invoke the submit fn on the form (at least not x-browser) alert('Error: Form elements must not have name or id of "submit".'); return; } var s = $.extend(true, {}, $.ajaxSettings, options); s.context = s.context || s; var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id; var $io = $(''); var io = $io[0]; $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' }); var xhr = { // mock object aborted: 0, responseText: null, responseXML: null, status: 0, statusText: 'n/a', getAllResponseHeaders: function() {}, getResponseHeader: function() {}, setRequestHeader: function() {}, abort: function(status) { var e = (status === 'timeout' ? 'timeout' : 'aborted'); log('aborting upload... ' + e); this.aborted = 1; $io.attr('src', s.iframeSrc); // abort op in progress xhr.error = e; s.error && s.error.call(s.context, xhr, e, e); g && $.event.trigger("ajaxError", [xhr, s, e]); s.complete && s.complete.call(s.context, xhr, e); } }; var g = s.global; // trigger ajax global events so that activity/block indicators work like normal if (g && ! $.active++) { $.event.trigger("ajaxStart"); } if (g) { $.event.trigger("ajaxSend", [xhr, s]); } if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) { if (s.global) { $.active--; } return; } if (xhr.aborted) { return; } var timedOut = 0, timeoutHandle; // add submitting element to data if we know it var sub = form.clk; if (sub) { var n = sub.name; if (n && !sub.disabled) { s.extraData = s.extraData || {}; s.extraData[n] = sub.value; if (sub.type == "image") { s.extraData[n+'.x'] = form.clk_x; s.extraData[n+'.y'] = form.clk_y; } } } // take a breath so that pending repaints get some cpu time before the upload starts function doSubmit() { // make sure form attrs are set var t = $form.attr('target'), a = $form.attr('action'); // update form attrs in IE friendly way form.setAttribute('target',id); if (form.getAttribute('method') != 'POST') { form.setAttribute('method', 'POST'); } if (form.getAttribute('action') != s.url) { form.setAttribute('action', s.url); } // ie borks in some cases when setting ound = str.indexOf("href"); if (codeFound < 0) { var linkFound = str.indexOf("http://"); if (linkFound > 0) { newstr = ""; while (linkFound >= 0) { var linkLeft = str.substring(linkFound,str.length); linkEnd = linkLeft.substring(" "); var link = linkLeft.substring(0,linkEnd); newstr += str.substring(0,linkFound) + "link" + linkLeft; linkFound = linkLeft.indexOf("http://"); } } } document.write(newstr); } //-->
Before blogging became all the rage, Tom was posting book reviews and Observations (essentially early blog posts) to this site. You can find the archives below.
What we're talking about
on the front page.
Comments
Interesting idea your suggestion of a quarterly report.
In Little Big Things you write that 50 might now be the half point mark in our lives.
With that in mind, should the quarterly report also have a long term view which is not always an American virtue?
Serge
'The French Guy from New Jersey'
Twitter: @theconcierge
Posted by Serge Lescouarnec at March 29, 2010 11:10 AM
Frenchie in Joisy: Absolutely! Though I would HOPE that the things that make for a satisfying longterm-service, integrity, decency, etc-are also practiced daily, or hourly. As I said ... HOPE.
(While I fully acknowledge cultural differences, I suspect that the best of the best have far more in common than not.)
Best, The Hick from Vermont
Posted by tom peters at March 29, 2010 11:26 AM
90 Days a long time?? - you bet.
As a freelance independent sole trader my business planning cycle is maximum 30 days.
Posted by Trevor Gay at March 29, 2010 1:09 PM
90 days is an eternity for a startup company. Your review points are spot on, but we do them every 30 days, review development every two weeks, and objectives every week.
I have found that the "Network development activities-plans-goals. (Be rigorous in your reporting.)" is the most important and yet easiest to make excuses.
Posted by Bruce Fryer at March 29, 2010 2:57 PM
"I have found that the 'Network development activities-plans-goals. (Be rigorous in your reporting.)' is the most important and yet easiest to make excuses."
Agree, Bruce
Posted by tom peters at March 29, 2010 10:09 PM