displayrelatedinfo not working on SP2013 in IE

Dec 3, 2013 at 4:42 PM
I've seen multiple threads on this around the net but haven't gotten anything to work. I can get spdisplayrelatedinfo to work in Chrome but not IE10! If I toggle back and forth between design and regular browse mode, it will update and show the related info. I've turned off the "minimal download strategy" thing on my site and have tried moving the code around, wrapping it, etc. but it won't seem to fire after the dropdown is updated to a new value. Any ideas?

I've put the code in a new item form, in a default new item form, in a script editor web part--no difference. I'm running out of ideas???

Like I said, it runs smooth as can be in Chrome but IE just doesn't seem to be firing anything on the update of the control. Don't know if any code will help here?
Coordinator
Dec 3, 2013 at 4:46 PM
Are you seeing any errors? Can you post your code?

I test primarily in IE, so you should see it working there.

M.
Dec 3, 2013 at 4:53 PM
No, it doesn't even seem to fire. No errors, but I suspect that's because the function isn't even calling on the control update. Here's the latest snip I've been trying (root site replaced with "mysite"):

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" src="http://mysite/sites/CC/quality/CFDB/SiteAssets/scripts/jquery-1.10.2.js"> </script>
<script type="text/javascript"  src="http://mysite/sites/CC/quality/CFDB/SiteAssets/scripts/jquery.SPServices-2013.01.js"></script>

<script type="text/javascript">
 $(document).ready(function() {
   $().SPServices.SPDisplayRelatedInfo({
  columnName: "Agent",
  relatedWebURL: "http://mysite/sites/CC/quality/CFDB",
  relatedList: "{6571ED8B-5C5F-4E17-A36C-1F315C0E63F1}",
  relatedListColumn: "Title",
  relatedColumns: ["PHONE", "TM", "UM", "AD", "DEPT", "CENTER", "MAS"],
  displayFormat: "list",
  numChars: 0,
  matchType: "Eq",
  CAMLQuery: "",
  matchOnId: false,  
  completefunc: null,
  debug: true});
  });
</script>
Coordinator
Dec 3, 2013 at 4:59 PM
No errors at all? IE reacts to errors differently than Firefox, at least.

A few suggestions:
  • Skinny down the call as much as possible so that you don't pass in values unless they override the defaults
  • Change your URLs to be relative
  • Step through the debugger
<script type="text/javascript" src="/sites/CC/quality/CFDB/SiteAssets/scripts/jquery-1.10.2.js"> </script>
<script type="text/javascript"  src="/sites/CC/quality/CFDB/SiteAssets/scripts/jquery.SPServices-2013.01.js"></script>
$(document).ready(function() {
  $().SPServices.SPDisplayRelatedInfo({
    columnName: "Agent",
    relatedWebURL: "/sites/CC/quality/CFDB",
    relatedList: "{6571ED8B-5C5F-4E17-A36C-1F315C0E63F1}",
    relatedListColumn: "Title",
    relatedColumns: ["PHONE", "TM", "UM", "AD", "DEPT", "CENTER", "MAS"],
    displayFormat: "list",
    debug: true
  });
});
M.
Dec 3, 2013 at 6:49 PM
Ok, I should have pointed out that the latest snip had full URLs just because I was stabbing at anything to try to get it to work. Since then, however, I have rebooted (just in case there was a funny cache issue between my SPD & IE) and tried debugging again. This time it threw an error out of core.js (d.outerHTML=e; NoModificationAllowedError) and then it all falls apart from there. It appears to have to do with its handling of "e" throughout the ScriptResource.axd and other sp js scripts.
Coordinator
Dec 3, 2013 at 7:00 PM
I think the error you're seeing with e is a red herring.

I don't see anything obviously wrong. Back to my debugger suggestion, I'm afraid. Try stepping through from $(document).ready().

M.
Dec 3, 2013 at 10:28 PM
I've tried, but it doesn't trip there...it is on the on-click event of the drop-down itself that it first throws the error. from then on, it just behaves like a normal drop-down. If I step thru that code on a fresh page load, the code will step around through the jquery with no problems. It fouls up when I try to utilize the control.

Once that first error happens, then it doesn't throw any more for the life of the page but it also doesn't do anything with the relatedinfo. I'm convinced there is something fouling up, maybe a jq conflict, keeping the page from processing that block anymore. I'll try playing with that and see what happens I guess.
Dec 4, 2013 at 6:51 PM
Ok...update. I went nuclear--deleted the whole list and started over on a whim. I'm thinking I had a field name that was conflicting somewhere, so I deleted the whole thing and started fresh. It's working for now on a single field, i'll see what happens when I add more to the form.
Coordinator
Dec 4, 2013 at 11:01 PM
Weird. Yes, let me know what happens.

M.