I am trying to make my child list take its lookup ID from the parameter in the URL and assign it to a dropdown. The following code used to work but no longer does, any ideas as to why?
<script type="text/javascript" src="https://XXXTEAMSITEXXX/Scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
//get the ProjectName from they query string
var batchID = getParameterByName("BatchID");
//Set the corresponding Lookup field value to the Contact ID
$("input[Title='BatchID']").val(batchID);
//use this line to disable the lookup field selection
$("input[Title='BatchID']").attr('disabled','disabled')
//use this line to hide the lookup field and label entirely
//$("input[title='BatchID']").closest("tr").hide();
$("select[title='Notes']").closest("tr").hide();
$('nobr:contains("Status of Transaction")').closest('tr').hide();
$('nobr:contains("Sender Name")').closest('tr').hide();
$('nobr:contains("Receiver Name")').closest('tr').hide();
});
function getParameterByName(name)
{
name = name.replace(/[[]/, "\[").replace(/[]]/, "\]");
var regexS = "[\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/+/g, " "));
}
</script>
Thanks for any assistance!
Ryan