Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: Cascade Dropdown SharePoint 2013

Hi Marc, I believe I may be able to add something to this.

I was using the following code (on a NewForm.aspx page in SharePoint 2013):
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2013.01/jquery.SPServices-2013.01.min.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript">
  $(document).ready(function() 
  {
    $().SPServices.SPCascadeDropdowns({
      relationshipList: "MegaMenuHeading",
      relationshipListParentColumn: "Section",
      relationshipListChildColumn: "Title",
      relationshipListSortColumn: "Order0",
      parentColumn: "Section",
      childColumn: "Heading",
      debug: true
    });
  });
</script>
However, it wasn't working, and the IE's developer toolbar showed the following error (which I also found in firebug in Firefox):
SEC7118: XMLHttpRequest for http://_vti_bin/Lists.asmx required Cross Origin Resource Sharing (CORS). 
NewForm.aspx

SEC7119: XMLHttpRequest for http://_vti_bin/Lists.asmx required CORS preflight. 
NewForm.aspx

SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied. 
NewForm.aspx
After spending time trying to enable CORS on my server I gave up and came across this thread. I changed 2013.01 to 0.7.2, and it's now working correctly. Note that in 2013.01 it didn't work with or without debug mode set.

Like the creator of this thread no messages were appearing in the debug window (which is very nifty btw), but I wonder if that's because it was failing before it even got to that point? What stands out for me is that the URL "http://_vti_bin/Lists.asmx" doesn't contain the domain name. Is it possible there's a bug in 2013.01 where relative paths haven't been used? Just guessing, no idea what magic you work underneath!

Also, Googling the last line brought up this page, in which you'd said it was unrelated to SPServices. It could be a similar issue, perhaps?
https://spservices.codeplex.com/workitem/10161

Hope that helps, and thanks for a great library!

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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