SPArrangeChoices - Site Column on a Custom Content Type

Jul 31, 2012 at 5:18 PM

This code is running on a publishing page - custom layout.

Note that Metrobar-Colour is a Site Column, this code is running on a page created in a subsite called News.

The Error I get in FireBug says

500 Internal Server Error

"NetworkError: 500 Internal Server Error - http://MyServer/sites/IT/News/_vti_bin/Lists.asmx"
 
Please also note that as a SharePpoint developer I am running SharePoint on my local machine and testing locally.

I am guessing that the issue is the Lists.asmx on my News subsite cannot see the Site Column "Metrobar-Colour", so I might need to change the columnName parameter.
This may also be a security issue, I am pretty certain I have seen JQuery erros like this when running on a local machine. Which is a bit of a problem for testing this!
  • SP2010 - Standard
  • Jquery Version is 1.7.2 min
  • SP Services version is 0.71a min
Below is the code, which is very simple. 

---------------------------------------------------------------

<script type="text/javascript">
     $(document).ready(function(){
          alert($().SPServices.SPGetCurrentSite());
          $().SPServices.SPArrangeChoices({
                 columnName: "Metrobar-Colour",
                 listName:
                 perRow: 6,
                 randomize: false
             });
     });
</script>
---------------------------------------------------------------

Note also that the field control is inside an EditModePanel.

<cc1:RadioButtonChoiceField FieldName="Metrobar-Colour" runat="server"></cc1:RadioButtonChoiceField>

 

Coordinator
Jul 31, 2012 at 6:08 PM

You have a blank listName above, which would cause an error.

I wrote the function to work with list forms, so it probably won't work with your custom layout. however, you could look at how the function works and build something which would work in your page.

M.

Jul 31, 2012 at 6:27 PM
Thanks for your response. I will try to write a function then. Although I still think that the JQuery CAML calls won't work when the browser is accessing the local machine. It's a security issue.

Adam Crawford

On 31 Jul 2012, at 18:09, "sympmarc"<notifications@codeplex.com> wrote:

From: sympmarc

You have a blank listName above, which would cause an error.

I wrote the function to work with list forms, so it probably won't work with your custom layout. however, you could look at how the function works and build something which would work in your page.

M.