SPServices.SPSetMultiSelectSizes values disapear

Jan 13, 2012 at 10:00 AM

Hi, I'm using the SPServices.SPSetMultiSelectSizes to set the width of multiple choice lookup fields in a list. When I use this the field resizes but the box on the left appears blank and users cannot select any options.

I'm new to jquery so I have attached my code. I have also tired the steps of adding the alert call to the page first to make sure I can access the jquerylibrary and spservices library, this worked fine and the alerts appeared as expected.

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" language="javascript" src="http://myurl/scripts/jquery-1.7.1.min.js ">
</script>
<script type="text/javascript" language="javascript" src="http://myurl/scripts/jquery.SPServices-0.7.0.min.js "></script>

<script type="text/javascript" language="javascript">
$(document).ready(function() {
  $().SPServices.SPSetMultiSelectSizes({
    multiSelectColumn: "My Column Name"
  });
});

	
</script>

Can you help me as to why the field is resizing but the options are now blank?

 

Thanks in advance.

Coordinator
Jan 13, 2012 at 2:56 PM

I'm not sure what's going on. Is the page customized in any way other than adding this script? For instance, have you replaced the LFWP with a DFWP?

M.

Jan 23, 2012 at 10:15 AM

No the page is not customised, there are other scripts in the Masterpage could these be causing the problem?

Coordinator
Jan 23, 2012 at 2:14 PM

It's possible that other scripts could cause issues if they are changing the DOM before SPSetMultiSelectSizes does. If you could isolate things, it would be a good test.

I don't think I've ever had a bug reported with the function, so it could be something unique to your setup.

M.

Mar 7, 2013 at 7:54 PM
Marc, thanks again for your help in the past. I am having this same issue. What I can tell you is this. It works fine in IE8 but not in IE7. The script loads and the fields resize but there is no information the fields to select. Tell me what I can give you so I can figure out how to make this work for my IE 7 users.
Coordinator
Mar 7, 2013 at 8:17 PM
Cam you post the code you are using? When I load my test pages in IE7 Compatibility mode, it works fine, but that doesn't mean I don't have a bug when it comes to IE7. Since I don't have IE7 running anywhere, it's hard for me to test.

M.
Mar 7, 2013 at 8:27 PM
When I do the same it looks fine also. But all my users that are using IE 7 are having the same issue. I don't have 7 to test with either. Do you want the entire page code or the just the script? Below is the script.
<script type="text/javascript" src="../../Scripts/jquery-ui-1.10.1/js/jquery.SPServices-0.7.2.min.js"></script> 
<script type="text/javascript"> 
$(document).ready(function() {
  $().SPServices.SPSetMultiSelectSizes({
    multiSelectColumn: "Platform or Team"
  });
  $().SPServices.SPSetMultiSelectSizes({
    multiSelectColumn: "Requested Service(s)"
  });
  $().SPServices.SPSetMultiSelectSizes({
    multiSelectColumn: "Assigned To"
  });
  // You can include other script which you want to run at page load in this block as well
});
</script>
Coordinator
Mar 7, 2013 at 8:30 PM
I just found a site out there called http://www.browserstack.com that will let me test in IE7. I'll try it out and get back to you.

M.
Mar 7, 2013 at 8:37 PM
Edited Mar 7, 2013 at 9:20 PM
Thanks Marc. Greatly appreciate all you do for us.
Coordinator
Mar 8, 2013 at 6:09 PM
FYI - I can reproduce the issue on BrowserStack, so I'll create an item in the Issue Tracker and try to get a fix into the upcoming release.

Out of curiosity, what percentage of your users are still on IE7? I'm seeing it less and less.

M.
Coordinator
Mar 8, 2013 at 6:10 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 8, 2013 at 6:14 PM
Well, the number still using it is hard to say. I work for the USDA and some of the web applications that they are still using will not work with any other browser but IE 7. So there could be quite a few. Thank you Marc again for your time that you give to help all of us out on here and other places.
Coordinator
Mar 12, 2013 at 6:46 PM
I've fixed this in 2013.01ALPHA5. Can yuo please give it a test?

M.
Mar 12, 2013 at 10:58 PM
As always you are the man. That did fix it thank you so much. My users are now very happy.
Coordinator
Mar 13, 2013 at 2:44 PM
Awesome. Keep in mind that you're using an alpha. It should be in pretty good shape, but update to the new version when I release it.

M.