文档库的自定义编辑表单中的保存按钮 [英] save button in custom edit form for document library

查看:90
本文介绍了文档库的自定义编辑表单中的保存按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有sharepoint 2010服务器场.我有一个文档库,这些文档库的默认格式为:新建,编辑,默认.我使用sharepoint Designer 2010在文档库中创建了编辑表单.此编辑表单无法在模式对话框中打开.我转到找到的文档库中的所有文件 我去表格文件夹并复制创建的表格.然后我转到自定义操作,然后在viewe功能区中使用

I have sharepoint 2010 farm. I have a document library where are default form: new, edit, default.I created edit form in my document library using sharepoint designer 2010. this edit form cannot opens in modal dialog i go to all files i found document library and i go to forms folder and copied created form. then i go to custom action and in viewe ribbon i created button like url navigation with 

javascript:SP.UI.ModalDialog.showModalDialog({ url: "/Дељени документи/Forms/checked.aspx?ID={SelectedItemId}", title: "Custom Edit Form/Destination", dialogReturnValueCallback: function(dialogResult){ SP.UI.ModalDialog.RefreshPage(dialogResult); location.reload(); }}

现在我的表单正在模式对话框中打开.我遇到了一个问题,即我的字段未与所选项目连接.我用代码解决了这个问题

now my form is openning in modal dialog.i have had a problem that my field are not connect with selected item. i resolved this problem with code

<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script><script type="text/javascript">

$(document).ready(function(){

var byID = $.getUrlVar('ID');})

$.extend({ 

  getUrlVars: function(){ 

  var vars = [], hash;  

 var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');   

for(var i = 0; i < hashes.length; i++)    {     

   hash = hashes[i].split('=');     

vars.push(hash[0]);     

vars[hash[0]] = hash[1]; 

  }   

return vars;  },  getUrlVar: function(name){    return $.getUrlVars()[name];  }});

</script>

此代码我放在CEWP中.但是现在我有保存按钮的问题.我尝试了下一个代码,但是什么也没有

this code i puted in CEWP. but now i have problem with save button. i tryed with next code but nothing

<input type="button" value="Save" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit')};Save()" /> -->
        <SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton1" InDesign="True" ListId="3774ed7b-2d7f-41b8-981b-7ecad819d764" RedirectUrl="http://test-net.dri.local" />
        <input type="button" value="Примени" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__commit;__redirect={/Дељени документи/Forms/viewe.aspx.aspx?ID=',$ListItemId,'&amp;Source=',$Source,'}'))}" />
		<!--	<input type="button" value="Snimi" name="btnSubmit" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__commit;__redirect={',$RedirectLoc,'}'))}" style="height: 22px;" /> -->

没有人的按钮不起作用.我可以保存更改.我该怎么办?

noone button is not working. i can save changes. what i do?

推荐答案

单击自定义保存按钮时,请检查浏览器控制台以查看如果有任何错误.

如何使用F12开发人员工具调试页面:

最好的问候,

Linda(张)


这篇关于文档库的自定义编辑表单中的保存按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆