在{ddwrt:GenFireServerEvent('__ commit; __ redirect'中将Javascript变量作为QueryString传递 [英] Pass Javascript Variable as QueryString in {ddwrt:GenFireServerEvent('__commit;__redirect

查看:59
本文介绍了在{ddwrt:GenFireServerEvent('__ commit; __ redirect'中将Javascript变量作为QueryString传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



   我在编辑表单中使用自定义保存。我想重定向到一个具有查询字符串值的网址,我已经从Javascript分配了该值。如何传递javascript变量 在{ddwrt:GenFireServerEvent('__ commit; __ redirect as querystring?



谢谢

解决方案


您是否在内部使用SharePoint 2013?


你可以添加查询字符串(参数=值)在目的地的末尾
页面url传递变量。


例如:http://sp/sites/team/test.aspx?key = 1


检查以下主题以获取更多详细信息:


https:// stackoverflow .com / questions / 17814847 / how-to-pass-variable-to-href-in-genfireserverevent-to-redirect-url


另一种方法,您可以使用脚本更改"保存"按钮的"源"参数,并在结尾处添加查询字符串(参数=值)目的地页面
url。

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

< script type =" text / javascript">


< blockquote>(document).ready(function(){

//用于保存按钮

var button =


('输入[名称

Hi,

    I am using Custom Save in my Edit Form. I want to redirect to a url with a querystring value which I have assigned from Javascript. How to pass the javascript variable in {ddwrt:GenFireServerEvent('__commit;__redirect as querystring?

Thanks

解决方案

Hi,

Are you using SharePoint 2013 on-premise?

You can add query string (parameter=value) at the end to the destination page url to pass the variable.

For example: http://sp/sites/team/test.aspx?key=1

Check the following thread for more details:

https://stackoverflow.com/questions/17814847/how-to-pass-variable-to-href-in-genfireserverevent-to-redirect-url

Another method, you can use the script to change "Source" parameter for the "Save" button and add query string (parameter=value) at the end of the destination page url.

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

<script type="text/javascript">


(document).ready(function () { // for Save button var button =


('input[name


这篇关于在{ddwrt:GenFireServerEvent('__ commit; __ redirect'中将Javascript变量作为QueryString传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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