Hi All,
I am getting intermittent loading of my JQuery in Internet Explorer & Receiving the below error in Firefox:
TypeError: $(...).SPServices is undefined
My Script is below, i have tried looking for a JQuery clash, but as it loads fine in Internet Exploer at times i kind of ruled it out.
Any ideas?
Tucker
I am getting intermittent loading of my JQuery in Internet Explorer & Receiving the below error in Firefox:
TypeError: $(...).SPServices is undefined
My Script is below, i have tried looking for a JQuery clash, but as it loads fine in Internet Exploer at times i kind of ruled it out.
Any ideas?
<script language="javascript" type="text/javascript" src="../../Style/JQ/jquery-1.9.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../../Style/JQ/jquery.SPServices-0.7.2.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
var DocumentType = $("option:selected", $("select[title='Document Type']")).text();
var Discipline = $("option:selected", $("select[title='Discipline']")).text();
var SeqNo = $("input[title='Sequence No']").val();
var PAWONo = $("input[title='PO / WO Number']").val();
$().SPServices({
operation: "GetListItems",
async: false,
listName: "Register",
CAMLViewFields: "<ViewFields><FieldRef Name='DocumentNo' /></ViewFields>",
CAMLRowLimit: 5,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var DocNo = ($(this).attr("ows_DocumentNo"));
var href = ($(this).attr("ows_DocumentNo")).split(",")[0];
var liHtml = "<li><a href='"+ href +"' target='_blank'>" + DocNo + "</a></li>";
$("#tasksUL").append(liHtml);
});
}
});
$().SPServices.SPComplexToSimpleDropdown({
columnName: "Discipline",
completefunc: null,
debug: true
});
$().SPServices.SPComplexToSimpleDropdown({
columnName: "Document Type",
completefunc: null,
debug: true
});
$("input[title='Document No']").val("MP0041" + '-' + PAWONo + '-' + Discipline + '-' + DocumentType + '-' + SeqNo);
$('form :input').change(function() {
var DocumentType = $("option:selected", $("select[title='Document Type']")).text();
var Discipline = $("option:selected", $("select[title='Discipline']")).text();
var SeqNo = $("input[title='Sequence No']").val();
var PAWONo = $("input[title='PO / WO Number']").val();
$("input[title='Document No']").val("MP0041" + '-' + PAWONo + '-' + Discipline + '-' + DocumentType + '-' + SeqNo);
});
$().SPServices.SPRequireUnique({
columnStaticName: "DocumentNo",
duplicateAction: 0,
ignoreCase: "false",
initMsg: "This value must be unique.",
initMsgCSSClass: "ms-vb",
errMsg: "This value is not unique.",
errMsgCSSClass: "ms-formvalidation"
});
});
</script>
Thanks in advance,Tucker