Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Javascript : Object Expected error.

$
0
0

Hi,

I have used a javascript in my sharepoint portal. Whenever I open the page in IE, it shows me "Object Expected" error at Line:1 Char:1.

Here is the code snippet that I have used:

$(document).ready(function() {
 // Create an array of unique user id's scraped from img rel tags
 var IDs = new Array();
 $('.author-image').each( function() {
  if($.inArray($(this).attr('rel'),IDs ) == -1) {
   IDs.push($(this).attr('rel'));
  }
 });

 // When sp.js is loaded run our function to display images
 ExecuteOrDelayUntilScriptLoaded(function() {DisplayAuthorImage(IDs);}, 'sp.js')
});

I am not able to figure out what is causing this error?



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>