July 2012 Entries

JQuery Add New Item to SPList

<div> <p> Task Title: <input id="Text1" type="text" /> <input id="Button1" type="button" value="Create Task" /> </p> </div><script src="http://ajax.googleapis... <script> $(document).ready(function () { $("#newTaskButton").click(f... () { CreateNewItem($("#newTaskTi... }); }); function CreateNewItem(title) { var batch = "<Batch OnError=\"Continue\"> \ <Method ID=\"1\" Cmd=\"New\"> ......

Export HTML Table to Excel with JS

<html xmlns="http://www.w3.org/19... runat="server"> <script Language="javascript"> function TableToExcel() { var strCopy = document.getElementById("de... window.clipboardData.setDat... strCopy); var objExcel = new ActiveXObject("Excel.Applic... objExcel.visible = true; var objWorkbook = objExcel.Workbooks.Add; var objWorksheet = objWorkbook.Worksheets(1); objWorksheet.Paste; } function exportToExcel() { var oExcel = new ActiveXObject("Excel.Applic... ......