SharePoint 2013 Markup Code работает внутри PlaceHolderMain, но не в том, что код встраивается в WebPart (EmbeddedFormfield)?

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/80883

Вопрос

на SPO 2013, пытаясь развернуть какой-то пользовательский код разметки, чтобы связать список

Markup Код работает При размещении в PlaceHolderMain через SPD VS Встраивание страницы сайта кода WebPart (EmbeddedFormfield)

У меня есть этот код отлично работает, когда я использую SPD 2013 и поместите его в Place Collemain с SPD 2013. Но если я использую SPO Red Page Ambed Code, он не связывает данные на раскрывающееся управление.Получить ничего в управлении.

<div id="uploadDiv">
   <label id="fileSelectorLabel">Select a file: </label>
   <input id="uploadInput" type="file"/>
   <script id="selection-options" type="text/x-jsrender">
    <option value="{{>#data.get_item('Name')}}#{{>#data.get_item('Title')}}#{{>#data.get_item('Department')}}">
      {{>#data.get_item('Name')}} 
    </option>
   </script>
   <select id="FacultyLookup">
   </select>
   <input id="clearUploadFormButton" type="button" value="Reset"/>
   <input id="uploadFileButton" type="button" value="Upload"/>
</div>
<div id="message">

</div>
.

Или это проблема, которую вы не можете иметь вызовы на файлы jQuery с фрагмента в встраивании.

Это было полезно?

Решение

One technique you might try is using a Content Editor Web Part. To ensure SharePoint doesn't mess with the code, you could add the code in a text file to the site. Then in the properties of the CEWP, reference the URL to the text file. This will render the contents of the text file in the web part.

enter image description here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top