vrijdag 11 oktober 2013

Disable a Hyperlink field without knowing the ID of your Sharepoint Field

I'm starting to write my own sharepoint helperclass with functions 
that can be called without knowing the ID's of the Sharepoint Fields, 
but by using the field Display Names. 

This function is to Disable or Enable a Sharepoint Hyperlink Field.

// call the function
// DisableHttpLink ("DISPLAYNAME", True) to disable the field
// DisableHttpLink ("DISPLAYNAME", False) to enable the field
function DisableHttpLink(titel, b_disable)
 var TD = $('nobr:contains("'+ titel + '")').closest("td").next("td").find('input');
    for(var i = 0; i < TD.length;i++)
  $("#" + TD[i].id).attr("disabled",b_disable);

Geen opmerkingen:

Een reactie posten