Show By Category

.NET Service (1) 1909 (1) ACTV (1) adidas (47) adizero (1) Admiral (9) Airness (3) Albania (3) Algeria (3) America Mineiro (1) Angola (1) Anta (2) Argentina (2) Armenia (1) Atletico Goianiense (1) Atletico Paranaense (1) Austria (2) Authentic fit (1) Auto Generate from Access (1) Avai FC (1) avoid (2) Bahia (1) Beijing Guoan (1) Belgium (4) Benin (1) Birmingham City (1) Bolivia (1) Boot Configuration Data missing (1) Bosnia (1) Botafogo (2) Botafogo SP (1) Botswana (2) Brazil (4) Brazilian brand (15) Bulgaria (2) Burkina Faso (2) Burrda (3) Bypass traverse checking (1) Cambodia (1) Cameroon (4) Castore (1) Ceara (1) CEWP (2) Chapecoense (2) Chile (3) China (9) Chinese Brand (4) Chongqing Lifan Dangdai (1) Club Deportivo Universidad Catolica (1) Club Universitario de Deportes (1) Clube de Remo (1) Colombia (6) Colombian Brand (1) Congo DR (1) Congo Rep (1) Copa America (3) Corinthians (1) Coritiba (1) Costa Rica (2) Cote d'Ivoire (3) Coventry City (1) Croatia (2) Crop IFRAME (1) Cruzeiro (2) Crystal Palace (4) css (3) Cuba (1) Cyprus (1) Czech Republic (2) Deleting large libraries (2) Denmark (2) design fault (2) Diadora (1) Dragao Premium (1) eagles (1) Ecuador (3) Ecuadorian Brand (3) Egypt (1) El Salvador (1) electrical (2) electrical problems (2) electrocuted (2) England (3) Errea (3) Espanyol (1) Ethiopia (1) Euro 16 (10) Excel 2010 (3) External Content Type (1) FBT (3) FC Porto (1) Fenerbahce (1) Figueirense (1) Finland (1) Fiorentina (1) Flamengo (1) Flickering (1) Fluminense (1) football (234) Fortuna Dusseldorf (1) France (2) futfanatics.net (1) Gabon (1) Germany (1) Ghana (2) Gogoalshop (2) Goias (1) Granada CF (1) Grand Sport (2) Greece (2) Green (1) Guangzhou Evergrande (1) Guinea (1) Guinea Bissau (1) Haiti (1) Heilongjiang Lava Spring (1) Honduras (1) Hong Kong (1) Hummel (1) Hungary (1) Iceland (3) Icone Sports (2) IE Developer Tools (1) India (1) Indian Brand (1) Internal Field Names (1) Italy (2) Jako (1) Jamaica (2) Japan (1) Javascript (6) Jersey (126) Jiangsu Suning FC (1) Joma (5) Kanxa (1) Kappa (3) Kelme (4) Kenya (1) kitchen extractor fan (3) Korea (1) Laos (1) Le Coq Sportif (1) leak (2) Legea (1) Levante (1) Li Ning (3) Local Security Policy (1) Login Problem (1) Lotto (4) Lupo (2) Macron (9) Mafro (3) Mali (3) Man Utd (1) Marathon Sports (6) Marseilles (1) masterpage (1) Meizhou Hakka (1) Mexico (5) Modena Volley (1) Montenegro (1) Morocco (3) Myanmar (1) N98 (1) Naija (1) Nakal (1) Namibia (1) Napoli (1) Netherlands (1) New Balance (2) Newcastle United (3) Niger (1) Nigeria (4) Nike (32) Nike Brasil (1) Nike Brazil (1) Nike China (12) Nike South Africa (1) North Macedonia (1) Norway (1) O'Neills (1) Oldham Athletic (1) Olympikus (1) Olympique Lyonnais (1) Page Viewer WebPart (1) Panama (2) Para (1) Paraguay (2) Penalty (1) Peru (6) Picture Manager (1) Poland (2) Ponte Preta (1) Portugal (2) Portuguesa RJ (1) problem (2) Puma (46) retro (1) review (111) Romai (2) Romania (1) RT Sports (1) Russia (4) Saeta (1) Sampaio Correa (1) Santarem (1) Santos (2) Sao Paulo FC (1) Sao Raimundo (1) scam (2) Score Draw (1) Search List with Count Displayed (1) Senegal (3) Serbia (1) Server Hardening (1) SESI Sao Paulo (1) Shandong Luneng (1) Shanghai Shenhua (1) Shanghai SIPG (1) SharePoint (61) SharePoint Connect to SQL (2) SharePoint Designer (3) Shenzhen FC (1) shirt (233) Sierra Leone (1) Singaporean Brand (2) Six5Six (1) Slovakia (2) Slovenia (1) Slow right click (1) Sondico (1) South Africa (1) Spain (3) SPS Services (2) Spurs (1) SQL Server 2008 (1) SSP User Profile behaviour (1) Super Bolla (2) Sweden (2) Switzerland (2) Taubate Funvic (1) Team GB (2) techfit (8) Thai Brand (3) Thailand (2) Togo (1) Topper (4) track top (13) Travels (1) Trinidad and Tobago (1) Tunisia (3) Turkiye (1) tyro (1) UAE (1) UB (3) UB Electric (3) Ucan (1) UE Llagostera (1) Uganda (1) Uhlsport (2) Ukraine (1) Umbro (18) Umbro Brazil (6) Under Armour (3) Upload Center (1) Uruguay (1) Vasco Da Gama (1) Venezuela (1) Vietnam (1) Villa Nova (1) Villarreal (1) Vitoria (1) volleyball (6) Vozao (1) Wales (1) Warrix (1) water (2) WebClient (4) WebDav (5) West Ham (2) Where to get buy Iceland football shirt in Reykjavik (1) Win 8 (2) Windows 10 (1) Windows Scheduled Task (1) wish list (1) Workflow (1) World Cup 14 (9) World Cup 18 (5) Wuhan Zall (1) Xinjiang Tianshan Leopard (1) Xtep (1) Yanbian Funde (1) Yemen (1) Zambia (1) Zhejiang Greentown (2) Zimbabwe (1)

Thursday, 14 May 2015

A SPS Test Page.

Thought I will post this as a summary for a test SPS page to add and update list items.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Simple SPS List Management Code</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style>
body
{
margin-left:1px;
}

</style>

<script type="text/javascript" src="/mysite/IS/mn/Files%20To%20Share/jquery-1.10.2.js"></script>
<script type="text/javascript" src="/mysite/IS/mn/Files%20To%20Share/jquery.SPServices-2014.02.min.js"></script>
<script type="text/javascript" src="/mysite/IS/mn/Files%20To%20Share/jquery.SPServices-2014.02.js"></script>
<script type="text/javascript">

function addItem()
{
var strSubsiteName =  document.getElementById("txtSubsiteName").value

var columnsForInsert = [];
        columnsForInsert[0] = ["Title", document.getElementById("txtTitle").value];
        columnsForInsert[1] = ["Country", document.getElementById("txtCountry").value];
        columnsForInsert[2] = ["Code", document.getElementById("txtCode").value];
    
      // Create New List Item
      $(document).ready(function() {
      
      $().SPServices({
           operation: "UpdateListItems",
           webURL: "/mysite/IS/"+strSubsiteName,
           async: true,
           batchCmd: "New",
           listName: "SPS",
           valuepairs: columnsForInsert,
           completefunc: function (xData, Status) {
             alert("List Item successfully created.");
          }
        }); // End of SPServices UpdateListItems
      });
}  

function updateItem()
{
var strSubsiteName =  document.getElementById("txtSubsiteName").value
var nDeleteID = document.getElementById("txtID").value;

if (parseInt(nDeleteID, 10))
{
   alert("Item with ID of " + nDeleteID + " will be updated.");
}
else
{
   alert("Please enter a valid ID to update list data.");
   return;
}

var columnsForUpdate = [];
        columnsForUpdate [0] = ["Title", document.getElementById("txtTitle").value];
        columnsForUpdate [1] = ["Country", document.getElementById("txtCountry").value];
        columnsForUpdate [2] = ["Code", document.getElementById("txtCode").value];

// Update List Item
$(document).ready(function() {
$().SPServices({
    operation: "UpdateListItems",
          webURL: "/mysite/IS/"+strSubsiteName,
    async: true,
    batchCmd: "Update",
    listName: "SPS",
    ID: nDeleteID,
  valuepairs: columnsForUpdate,
    completefunc: function (xData, Status) {
        alert("List Item has been updated");
    }
});
});


function deleteItem()
{
var strSubsiteName =  document.getElementById("txtSubsiteName").value
var nDeleteID = document.getElementById("txtID").value;

if (parseInt(nDeleteID, 10))
{
   alert("Item with ID of " + nDeleteID + " will be deleted.");
}
else
{
   alert("Please enter a valid ID to delete from list.");
   return;
}

// Delete List Item
$(document).ready(function() {
$().SPServices({
    operation: "UpdateListItems",
    webURL: "/mysite/IS/"+strSubsiteName,
    async: true,
    batchCmd: "Delete",
    listName: "SPS",
    ID: nDeleteID,
  completefunc: function (xData, Status) {
        alert("List Item deleted");
    }
});
});

}

function deleteFile() 
{

var nDeleteID = document.getElementById("txtID").value;
var strFileRef = document.getElementById("txtFileRef").value;

if (strFileRef == "")
{
alert("Must enter a ref URL to the file in the library that you wish to delete.  Eg : http://myserver/document/mydoc.docx");
   return;
}

if (parseInt(nDeleteID, 10))
{
   alert("Item with ID of " + nDeleteID + " will be deleted.");
}
else
{
   alert("Please enter a valid ID to delete from list.");
   return;
}

// This is the command needed to delete the specified file. It uses the ID and the URL of the file name. These values must be passed into this function when calling it.
var batchCmd = "<Batch OnError='Continue'><Method ID='1' Cmd='Delete'><Field Name='ID'>" + nDeleteID + "</Field><Field Name='FileRef'>" + strFileRef + "</Field></Method></Batch>";

// Use SPServices to delete the file.
$().SPServices({
operation: "UpdateListItems",
async: false,
listName: "SPS",
updates: batchCmd,
completefunc: function ( xData, Status ) {

// Check the error codes for the web service call.
$( xData.responseXML ).SPFilterNode( 'ErrorCode' ).each( function(){
responseError = $( this ).text();

// If the error codes indicate that the file was successfully deleted, inform the user.
if ( responseError === '0x00000000' ) {
alert( "The file has been successfully deleted." );
}

// If the error codes indicate that the file was NOT successfully deleted, inform the user.
else {
alert( "There was an error trying to delete the file." );
}
});
}
});
}

</script>

<script type="text/javascript">

//////////////////////////////////////////////////////////////////////
// Test Concept functions trying to add OR to a AND CAML query
function getPMAFunds_And_Or()
{

var strDeptValue = "Equities";
var strRegionValue = "TW";
var strReportTypeValue = "Attribution";
var strReportFinderType = "Active";

$(document).ready(function() {
        var soapEnv =
            "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
                <soapenv:Body> \
                     <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                        <listName>Report Names</listName> \
                        <query><Query><Where><And><And><And><And><Contains><FieldRef Name='Asset_Type'/><Value Type='Text'>"+strDeptValue+"</Value></Contains> \
                         <Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
                         </And> \
                         <Contains><FieldRef Name='Region'/><Value Type='Text'>"+strRegionValue+"</Value></Contains> \
                         </And> \
                         <Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
 </And><Or><Or><Or> \
  <Contains> \
                            <FieldRef Name='Group1' /> \
                          <Value Type='Boolean'>0</Value> \
                        </Contains> \
                        <Contains> \
                            <FieldRef Name='Group2' /> \
                          <Value Type='Boolean'>0</Value> \
                        </Contains> \
  </Or> \
  <Contains> \
                            <FieldRef Name='Group3' /> \
                          <Value Type='Boolean'>0</Value> \
                        </Contains> \
  </Or> \
  <Contains> \
                            <FieldRef Name='Group4' /> \
                          <Value Type='Boolean'>1</Value> \
                        </Contains> \
</Or> \
  </And> \
 </Where> \
                         <OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
                        <viewFields> \
                            <ViewFields> \
                               <FieldRef Name='Display_Code' /> \
                              <FieldRef Name='Asset_Type' /> \
                              <FieldRef Name='Report_Code' /> \
                              <FieldRef Name='Region' /> \
                              <FieldRef Name='Live' /> \
                              <FieldRef Name='Report_Type' /> \
                              <FieldRef Name='Group1' /> \
  <FieldRef Name='Group2' /> \
    <FieldRef Name='Group3' /> \
    <FieldRef Name='Group4' /> \
                           </ViewFields> \
                        </viewFields> \
                    </GetListItems> \
                </soapenv:Body> \
            </soapenv:Envelope>";

        $.ajax({
            url: "/mysite/is/mn/_vti_bin/lists.asmx",
            type: "POST",
            dataType: "xml",
            data: soapEnv,
            complete: processPMAFunds,
            contentType: "text/xml; charset=\"utf-8\""
        });
    });
}

function getPMAFunds_All_Ands()
{

var strDeptValue = "Equities";
var strRegionValue = "TW";
var strReportTypeValue = "Attribution";
var strReportFinderType = "Active";

$(document).ready(function() {
        var soapEnv =
            "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
                <soapenv:Body> \
                     <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                        <listName>Report Names</listName> \
                        <query><Query><Where><And><And><And><And><And><And><And><Contains><FieldRef Name='Asset_Type'/><Value Type='Text'>"+strDeptValue+"</Value></Contains> \
                         <Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
                         </And> \
                         <Contains><FieldRef Name='Region'/><Value Type='Text'>"+strRegionValue+"</Value></Contains> \
                         </And> \
                         <Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
 </And> \
  <Contains> \
                            <FieldRef Name='Group1' /> \
                          <Value Type='Boolean'>0</Value> \
                        </Contains> \
 </And> \
<Contains> \
                            <FieldRef Name='Group2' /> \
                          <Value Type='Boolean'>0</Value> \
                        </Contains> \
 </And> \
 <Contains> \
                            <FieldRef Name='Group3' /> \
                          <Value Type='Boolean'>1</Value> \
                        </Contains> \
 </And> \
 <Contains> \
                            <FieldRef Name='Group4' /> \
                          <Value Type='Boolean'>1</Value> \
                        </Contains> \
 </And> \
 </Where> \
                         <OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
                        <viewFields> \
                            <ViewFields> \
                               <FieldRef Name='Display_Code' /> \
                              <FieldRef Name='Asset_Type' /> \
                              <FieldRef Name='Report_Code' /> \
                              <FieldRef Name='Region' /> \
                              <FieldRef Name='Live' /> \
                              <FieldRef Name='Report_Type' /> \
                              <FieldRef Name='Group1' /> \
  <FieldRef Name='Group2' /> \
    <FieldRef Name='Group3' /> \
    <FieldRef Name='Group4' /> \
                           </ViewFields> \
                        </viewFields> \
                    </GetListItems> \
                </soapenv:Body> \
            </soapenv:Envelope>";

        $.ajax({
            url: "/mysite/is/mn/_vti_bin/lists.asmx",
            type: "POST",
            dataType: "xml",
            data: soapEnv,
            complete: processPMAFunds,
            contentType: "text/xml; charset=\"utf-8\""
        });
    });
}
// End of Test Functions
////////////////////////////////////////////////////////////////////////////////////////////////////

var strGroupsUserBelongsTo = "";
/* place code right before the matching closing tag </asp:Content> for <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">*/
  $(document).ready(function() {
    $().SPServices({
      operation: "GetGroupCollectionFromUser",
      userLoginName: $().SPServices.SPGetCurrentUser(),
      async: false,
      completefunc: function(xData, Status) {
        // Code below to set what permission current user belongs to
        if($(xData.responseXML).find("Group[Name='Group Owners']").length == 1) {
          //alert("User is in the group");
          // set the string for user's permission settings.  If he is in a group it is 1 else 0.
          // this string will be used later.
          strGroupsUserBelongsTo = "1,0,0,0";
         
          // Call main get funds function
          getPMAFunds("0,1,0,0");
         
        }
        else
        {
        strGroupsUserBelongsTo = "1,0,0,1";
              getPMAFunds("1,0,0,0");
        }
      }
    }); /*close().SPServices({ */
}); /* close (document).ready(function() { */

function getPMAFunds(strGroupsUserIn)
{

var strDeptValue = "Equities";
var strRegionValue = "TW";
var strReportTypeValue = "Characteristics";
var strReportFinderType = "Active";

$(document).ready(function() {
        var soapEnv =
            "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
                <soapenv:Body> \
                     <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                        <listName>Report Names</listName> \
                        <query><Query><Where><And><And><And><Contains><FieldRef Name='Asset_Type'/><Value Type='Text'>"+strDeptValue+"</Value></Contains> \
                         <Contains><FieldRef Name='Report_Type'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains> \
                         </And> \
                         <Contains><FieldRef Name='Region'/><Value Type='Text'>"+strRegionValue+"</Value></Contains> \
                         </And> \
                         <Contains><FieldRef Name='Live'/><Value Type='Text'>"+strReportFinderType+"</Value></Contains> \
 </And> \
 </Where> \
                         <OrderBy><FieldRef Name='Display_Code' Ascending='TRUE' /></OrderBy></Query></query> \
                        <viewFields> \
                            <ViewFields> \
                               <FieldRef Name='Display_Code' /> \
                              <FieldRef Name='Asset_Type' /> \
                              <FieldRef Name='Report_Code' /> \
                              <FieldRef Name='Region' /> \
                              <FieldRef Name='Live' /> \
                              <FieldRef Name='Report_Type' /> \
                              <FieldRef Name='Group1' /> \
  <FieldRef Name='Group2' /> \
    <FieldRef Name='Group3' /> \
    <FieldRef Name='Group4' /> \
                           </ViewFields> \
                        </viewFields> \
                    </GetListItems> \
                </soapenv:Body> \
            </soapenv:Envelope>";

        $.ajax({
            url: "/mysite/is/mn/_vti_bin/lists.asmx",
            type: "POST",
            dataType: "xml",
            data: soapEnv,
            complete: function(jqXHR, textStatus)
            { 
            processPMAFunds(jqXHR, textStatus, strGroupsUserIn)
            
            },
            contentType: "text/xml; charset=\"utf-8\""
        });
    });
}


    function processPMAFunds(xData, status, strGroups) 
    {

var strForDropDown = "";   
   $(xData.responseXML).find("z\\:row, row").each(function() {
            strForDropDown = strForDropDown + $(this).attr("ows_Display_Code") + "@" + $(this).attr("ows_Report_Code") + "@" + $(this).attr("ows_Group1") + "@" + $(this).attr("ows_Group2") + "@" + $(this).attr("ows_Group3") + "@" + $(this).attr("ows_Group4") + "@" +"\n";
        });
        // Now populate the department dropdown with our extracted data
        alert(strGroups);
        //alert(strForDropDown);
        populateFunds(strForDropDown, strGroups);
    }

// function that populates fund drop down
function populateFunds(strForDropDown, strGroupsForUser)
{
//Clear the dropdown if there is anything.
document.getElementById("cboFunds").options.length = 0;
document.getElementById("cboFunds").options[0] = new Option("(None)", "None");
if (strForDropDown != "")
{

var item_array = strForDropDown.split("\n");

for (var iCount = 0; iCount < (item_array.length-1); iCount++)
{
//alert(item_array[iCount].toString());
var items = item_array[iCount].split("@");

try
{
// Force "None" into all values because it needs this value to fool SharePoint into accepting it when saving 
var bHasPermission = userHasPermission(items[2], items[3], items[4], items[5], strGroupsForUser)

if (bHasPermission == true)
{
document.getElementById("cboFunds").options[iCount+1] = new Option(items[0], items[1]);
}
}
catch(ex)
{
alert("Possible array out of bound error - populateFunds(strForDropDown)");
}
}

}
else
{
document.getElementById("cboFunds").options[0] = new Option("(None)", "None");
}

// Trim the select box of null items.  The above insertions can result in some blank entries
for (var i = 0; i < document.getElementById("cboFunds").length; i++)
    {
      if (document.getElementById("cboFunds").options[i].value == "")
      {
      //alert("Null Item at " + i);
      document.getElementById("cboFunds").remove(i);
      i = i - 1;
     
}
}

// function to decide whether user has permission to see a fund
function userHasPermission(strGroup1, strGroup2, strGroup3, strGroup4, strGroupsUserBelongs)
{
var returnPermission = false;
//var userPermissions = strGroupsUserBelongsTo.split(",");
var userPermissions = strGroupsUserBelongs.split(",");

if (userPermissions[0] == 1 && strGroup1 == 1)
{
returnPermission = true;
}

if (userPermissions[1] == 1 && strGroup2 == 1)
{
returnPermission = true;
}

if (userPermissions[2] == 1 && strGroup3 == 1)
{
returnPermission = true;
}

if (userPermissions[3] == 1 && strGroup4 == 1)
{
returnPermission = true;
}

// If nothing been initialised and set, show it to users.  Remove this section if you want to block access instead.
if (strGroup1 == "undefined" && strGroup2 == "undefined" && strGroup3 == "undefined" && strGroup4 == "undefined")
{
returnPermission = true;
}

return returnPermission;
}

getUserBU();

function getUserBU()
{

var strReportTypeValue = "Simon Chung";

$(document).ready(function() {
        var soapEnv =
            "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
                <soapenv:Body> \
                     <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                        <listName>GWMS_ContactList</listName> \
                        <query><Query><Where><Contains><FieldRef Name='Title'/><Value Type='Text'>"+strReportTypeValue+"</Value></Contains></Where>  \
                        <OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy></Query></query> \
                        <viewFields> \
                            <ViewFields> \
                              <FieldRef Name='Title' /> \
                              <FieldRef Name='BusinessContactDept0' /> \
                           </ViewFields> \
                        </viewFields> \
                    </GetListItems> \
                </soapenv:Body> \
            </soapenv:Envelope>";

        $.ajax({
            url: "http://mfcgim.ap.manulife.com/mysite/IS/gwms/_vti_bin/lists.asmx",
            type: "POST",
            dataType: "xml",
            data: soapEnv,
            complete: processUserBUs,
            contentType: "text/xml; charset=\"utf-8\""
        });
    });
}

function processUserBUs(xData, status) 
    {

var strForDropDown = "";   
   $(xData.responseXML).find("z\\:row").each(function() {
            strForDropDown = strForDropDown + $(this).attr("ows_Title") + "@" + $(this).attr("ows_BusinessContactDept0") +"\n";
        });
        // Now populate the department dropdown with our extracted data
        
        alert(strForDropDown);
    }

alert($().SPServices.SPGetCurrentUser());


</script>


</head>
<BODY>
<div id="StatusMessages" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; margin-left:0px; font-family:Verdana; font-size:small">
<input type="button" onclick="addItem()" value="Add Item" style="font-family:inherit;font-size:small" />
<input type="button" onclick="updateItem()" value="Update Item" />
<input type="button" onclick="deleteItem()" value="Delete Item" />
<input type="button" onclick="deleteFile()" value="Delete Item - File" /><br><br>
ID: <input type="text" id="txtID" name="txtID"/> Title: <input type="text" id="txtTitle" name="txtTitle"/> Country: <input type="text" id="txtCountry" name="txtCountry"/> Code: <input type="text" id="txtCode" name="txtCode"/> Subsite URL Name: <input type="text" id="txtSubsiteName" name="txtSubsiteName"/><br><br>
File Ref : Must be added for Delete File <input type="text" id="txtFileRef" name="txtFileRef" size="100"/><br><br>
Funds to Select : <select name="cboFunds" id="cboFunds" style="WIDTH: 330px"><option></option></select>
</div> 
<script type="text/javascript">
</script>
</BODY></html>


More Problems with Excel 2010 xslm

Do a search on google eg linked below

https://www.google.com.hk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=Repaired%20Records%3A%20Drawing%20from%20%2Fxl%2Fdrawings%2Fdrawing2.xml%20part%20(Drawing%20shape)

You will see millions of people suffering this problem where they have a slightly more complicated .xlsm file that when saved in Excel 2010, it gets corrupted and pictures/charts and button controls gets deleted.  Usually the file had started its history in Excel 03 then 07.

MS seems to have no proper fix. except tell users to recreate the file into a 2010 Workbook.  Well for some people that just requires too much time although one should consider this as a mini project to fix the problem.

However, here is a short term work around. 

Assuming you only have Excel 2010

Open the xlsm.  Make you changes like adding a formula to a cell.
Do a Save As for the file but save it in 2003-07 xls format.  It will prompt for issues.  Click OK.
Close Excel
Open the new .xls file in Excel 2010.
Do a Save As again and save it as a .xlsm file.  Close the file and Excel.
Open the new .xlsm again in Excel 2010.  

And voila it seemed to have saved without getting the file corrupted and then removing its charts/pictures and button controls.

There is a second method that can also side step the problem.  I think it shows up this is a bad bug from MS which they ought to try to address.

Open the xlsm.  Make you changes like adding a formula to a cell.
Do a Save As for the file.  Change the name of it.  Keep it as xlsm  Click OK.
Close Excel
Rename the file back to its old file name.  
Open the new .xlsm again in Excel 2010. 

And voila.

Apparently, this bug is NOT just affecting xslm file, it affects xlsx files that have formulae and links, references with other work books.  It affects files who had a history of being started in 2003 or before xls format.

Tuesday, 5 May 2015

Cote d'Ivoire Puma away shirt WC 14

Now this would have been a fantastic shirt had it been just a bit smaller since it is actually very loose fit although you see pictures of the tight ACTV version modelled by the players.
It's quite standard crew collar.
Great badge as usual.
Nice details on the sleeves and shoulders.  The patterns are a great touch of character.  Great take on the elephants.
The cat jumps towards the elephant.
Clean back.  Overall nice material tool, this was a nice shirt.  It's just too loose for me even a small size feels really big.

Sunday, 3 May 2015

Poland Nike shirt 14

This was another steal from elevens.com.hk.  It was not a bad effort from Nike but I feel they can do a lot better for Poland rather than just a template with a line down the middle.  Considering some of the classic adidas shirts that Poland had in the late 70s especially the one with the red pinstripes.  You ought to think they could do better.
Well Nike are boring anyway.  So boring that you can actually buy this team wear shirt and then perhaps stitch the crest on.
One decent thing was the crest.  They do place it well.  And it's a nice white eagle crest.

Material is pretty standard.  Just find the fit rubbish for Nike shirts.  They are way too big but it's easy to get it altered if required as the seams are straight forward.  Anyway, it's an OK shirt, just wished they could have spent more effort on a more classic look.

Tuesday, 21 April 2015

Boot Configuration Data (BCD) store is missing - Another Option

Many people had seen this dreaded error where Windows 8 suddenly comes up with a message after a shut down and fails to boot up



And then many of us are cursing oh, no I have no recovery USB stick readied for a such an event because I have been lazy.  With many of the potential solutions outline in this post http://pcsupport.about.com/od/fixtheproblem/ht/rebuild-bcd-store-windows.htm

And guess what pressing F11 on start did not work.  Going to the UEFI settings only gets you to the BIOS settings and there seem to be no setting there to allow you to get out of seeing this error screen.

Well, it turns out there is still another option.  I contacted my machine's manufacturer (Asus) who told me their machines requires one to press F9 on start up to get to an option screen.  However, on the BIOS settings, it is important to firstly turn off the Fast Boot option if it was on.

Once Fast boot is disabled, press F9 continuously on startup and voila the screen like below appears.





Choose the keyboard and then another option screen appears.


It turns out that in some cases like mine, just choosing the Continue option from the above screen, can correct the BCD corruption problem.  Although I must admin others may be suffering a bigger problem with the harddisk for Windows to report such an error.  And a full recovery may be required.  At least it gives the users a chance to select the Troubleshoot option and boot in Advance Mode.

Wednesday, 8 April 2015

Belgium Burrda away shirt 14

I got hold of the away shirt for Belgium, the last one made by Burrda.  Needless to say I personally preferred these than the adidas ones now.  I thought they had a nice character about them especially the collar and the cuffs.
The sash diagonal is pretty nice in a black background great use of national colours.
Decent badge.
These shirts had a good shape about them with excellent length sleeves.  Great fit.  
Here is where Burrda need improving.  Or may be I have worn this too much but after several washes, the transferred bran logos are loosing their colours.
The ones on the sleeves even suffering worse.
The print transfer at the back us coming off.  But then again I have had the same problem with some adidas shirts for example the Mexico away shirt where the letters at the back have come off.  So Burrda could do better though.
Overall I do like this shirt very much.  The material, design and for is great.  Just hoping they could have improved on the logo print.