\")";var printI=document.createElement('iframe');printI.name="printIframe";printI.id=strFrameName;printI.className="MSIE";document.body.appendChild(printI);printI.src=iframeSrc}else{var $frame=$("
");$frame.appendTo("body")} var $iframe=$("#"+strFrameName);if(!opt.debug)$iframe.css({position:"absolute",width:"0px",height:"0px",left:"-600px",top:"-600px"});setTimeout(function(){var $doc=$iframe.contents(),$head=$doc.find("head"),$body=$doc.find("body");$head.append('
');if(opt.importCSS)$("link[rel=stylesheet]").each(function(){var href=$(this).attr("href");if(href){var media=$(this).attr("media")||"all";$head.append("
")}});if(opt.importStyle)$("style").each(function(){$(this).clone().appendTo($head)});if(opt.pageTitle)$head.append("
"+opt.pageTitle+"
");if(opt.loadCSS){if($.isArray(opt.loadCSS)){jQuery.each(opt.loadCSS,function(index,value){$head.append("
")})}else{$head.append("
")}} if(opt.header)$body.append(opt.header);if(opt.printContainer)$body.append($element.outer());else $element.each(function(){$body.append($(this).html())});if(opt.formValues){var $input=$element.find('input');if($input.length){$input.each(function(){var $this=$(this),$name=$(this).attr('name'),$checker=$this.is(':checkbox')||$this.is(':radio'),$iframeInput=$doc.find('input[name="'+$name+'"]'),$value=$this.val();if(!$checker){$iframeInput.val($value)}else if($this.is(':checked')){if($this.is(':checkbox')){$iframeInput.attr('checked','checked')}else if($this.is(':radio')){$doc.find('input[name="'+$name+'"][value='+$value+']').attr('checked','checked')}}})} var $select=$element.find('select');if($select.length){$select.each(function(){var $this=$(this),$name=$(this).attr('name'),$value=$this.val();$doc.find('select[name="'+$name+'"]').val($value)})} var $textarea=$element.find('textarea');if($textarea.length){$textarea.each(function(){var $this=$(this),$name=$(this).attr('name'),$value=$this.val();$doc.find('textarea[name="'+$name+'"]').val($value)})}} if(opt.removeInline){if($.isFunction($.removeAttr)){$doc.find("body *").removeAttr("style")}else{$doc.find("body *").attr("style","")}} setTimeout(function(){if($iframe.hasClass("MSIE")){window.frames.printIframe.focus();$head.append("")}else{$iframe[0].contentWindow.focus();$iframe[0].contentWindow.print()} if(!opt.debug){setTimeout(function(){$iframe.remove()},1000)}},opt.printDelay)},333)};$.fn.printThis.defaults={debug:!1,importCSS:!0,importStyle:!1,printContainer:!0,loadCSS:"",pageTitle:"",removeInline:!1,printDelay:333,header:null,formValues:!0};jQuery.fn.outer=function(){return $($("
").html(this.clone())).html()}})(jQuery) //-->
JSON Outputs (simulating the calls made to Save a Document else when collaborating)
Add
Delete
Edit
CSV Output
JSON Inputs (simulating the sort of input expected... building from a Saved File... Document Collaboration)