I am using infragistics JQUery map in MS sharepoint project and i am getting this below error. I have used the same infragistics jquery map in ASP.NET web project and i am able to get the map but using sharepoint project i am getting the below error.
ERROR: "Microsoft JScript runtime error: Object doesn't support property or method igMap."
Please see below for the code i am using.
Please let me know if anybody faced same kind of issue earlier and has some idea to solve this.
Hi Lakshmi,
It seems you are facing issues with loading the required scripts. I am not sure how you load your scripts, but SharePoint has its own object model, used for JavaScript (SharePoint JavaScript Object Model).
You might want to check the following MSDN article: http://msdn.microsoft.com/en-us/library/ff411788.aspx
Thanks Sartor. I got it what you saying. I am loading the infragistics jQuery script files like this. I am not sure it is loading properly. Can you please suggest me how to include these files to my project.
<html> <head> <title>Infragistics NetAdvantage for jQuery igGridGroupBy</title> <!-- jQuery Core --> <script src="E:\Projects\UsingMapControl\UsingMapControl\MapNav\jquery-1.8.2.js" type="text/javascript"></script> <!-- jQuery UI --> <script src="E:\Projects\UsingMapControl\UsingMapControl\MapNav\jquery-ui.js" type="text/javascript"></script> <!-- Infragistics Loader --> <script type="text/javascript" src="E:\Projects\UsingMapControl\UsingMapControl\ig_ui\js\infragistics.loader.js"></script>
<script type="text/javascript"> $.ig.loader({ scriptPath: "ig_ui/js/", cssPath: "ig_ui/css/", resources: "igMap" }); $.ig.loader(function () { $("#map").igMap({ width: "100%",
Thanks, Lakshmi
That error can also often happen if you happen to be loading the jQuery library twice, for whatever reason. If you load the jquery library again after loading the map, it will essentially end up removing the igMap widget, so make sure that the jQuery scripts are only loaded once for the page.
You can check with a tool like Firebug (for FireFox) or IE Developer Tools (for Internet Explorer) if the scripts have correct paths in your project, or if they are even requested by the Object Model.
If you are trying the visualize the control directly on a SharePoint page, your scripts would need to be uploaded on the SharePoint site / application (for example in the Site Assets library).