javascript - Undefined is not a function - SPServices -


कंसोल लॉग:

  Uncaught TypeError: अपरिभाषित एक समारोह index.html नहीं है: 77 LoadCat index.html: 77 (अनाम फ़ंक्शन) index.html: 107 n.event.dispatch jquery.js: 3 r.handle   

कोड:

  समारोह LoadCat (बिल्ली) {अगर (बिल्ली = अशक्त!) {var CAML = '& lt; क्वेरी और gt; & lt; कहाँ & gt; & lt; Eq & gt; & lt; FieldRef नाम = "विभाग" / & gt; & lt; मूल्य type = "text" & gt; ' + बिल्ली + '& lt; / value & gt; & lt; / Eq & gt; & lt; / where & gt; & lt; / क्वेरी & gt;'; } Else {var CAML = ''; } var liHtml = "श्रेणी: & lt; चयन करें नाम = \" श्रेणी के चयन \ "id = \" श्रेणी से चुनें \ "& gt;"; । $ () SPServices ({आपरेशन: "GetListItems", async: झूठे, webURL: "पीएसएस / StaffShop /", listname: "श्रेणी", CAMLViewFields: "& LT; ViewFields & gt; & lt; FieldRef नाम = 'शीर्षक' / & gt; & lt; / ViewFields & gt; ", CAMLQuery: CAML, completefunc: समारोह (xData, स्थिति) {$ (xData.responseXML) .SPFilterNode (" Z: पंक्ति ")। प्रत्येक (function () {liHtml = liHtml +" से & lt; विकल्प मूल्य = \ "" + $ (this) .attr ( "ows_Title") + "\" & gt; "+ $ (this) .attr (" ows_Title ") + '& lt; / विकल्प & gt;";}); liHtml = liHtml + "& lt; / select & gt;"; $ ("# cat")। html (liHtml);}}); }   

कोड कॉल:

  $ ('। क्षेत्र')। क्लिक करें (फ़ंक्शन () {चेतावनी ($ (यह) .attr ("href ")); लोडकैट ();});   

कोड इस लाइन पर असफल हो रहा है:

  $ ()। SPServices ({  

हालांकि

  - JQuery लोड किया जाता है - SPServices लोड किया जाता है - फ़ंक्शन को दस्तावेज़ तैयार में कहा जाता है   

फ़ुल कोड उन लोगों के लिए यहां है:

संपादित करें :

ऐसा लगता है कि क्लिक पर SPServices संदर्भ खो दिया जा रहा है?

क्या कोई इस पर कोई प्रकाश डाल सकता है?

जेक्जरी को दो बार परिभाषित किया गया था जिससे SPServices को सही तरीके से लोड नहीं किया जा रहा था।

Comments

Popular posts from this blog

Pygame memory leak with transform.flip -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

python - Writing Greek in matplotlib labels, titles -