SharePoint 2013 MARKUP代码在PlaceWall内部工作,但不是嵌入WebPart(EmbeddedFormfield)的代码?

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

在SPO 2013上尝试部署某些自定义标记代码绑定列表

标记代码在通过嵌入代码站点页面webpart(EmbeddedFormfield)

我有这个代码在使用SPD 2013时完美地工作,并将其放在与SPD 2013中的占位符上。但是如果我使用SPO编辑页面嵌入代码,它将不会将数据绑定到下拉控制器。在控制中没有什么。

<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归因
scroll top