按钮单击事件后保持同一页面(Stay on same page after button click event)
我们使用调查链接进行反馈在URL之后使用后缀以确保不会看到所有SP组件。 使用后缀时,底部有一个取消按钮,需要隐藏或删除。 此外,当用户点击完成按钮导航到空白页面时,是否可以发出“感谢您的反馈”之类的提醒,并在按钮点击事件后保持在同一页面上。
我正在使用这段代码,这没有用。
<input type="button" Text="Finish" value="Form Action" name="btnFormAction0" onclick="javascript: {ddwrt:GenFireServerEvent ('__commit)')};alert('Your survey has been submitted Successfully');window.parent.location='https://team.SharePoint.com/teams/Prod/Lists/Comm_Mgmt/newform.aspx?IsDlg=1'" />
We use a survey link for feedback A suffix is use after the URL to make sure all SP components are not seen. When suffix is used there is a cancel button at the bottom which needs to be hidden or removed. And also when user clicks on finish button it navigates to a blank page, is it possible to give an alert like "Thanks for your feedback" and stay on the same page after button click event.
I am using this piece of code and this doesn't help.
<input type="button" Text="Finish" value="Form Action" name="btnFormAction0" onclick="javascript: {ddwrt:GenFireServerEvent ('__commit)')};alert('Your survey has been submitted Successfully');window.parent.location='https://team.SharePoint.com/teams/Prod/Lists/Comm_Mgmt/newform.aspx?IsDlg=1'" />
原文:https://stackoverflow.com/questions/21400108
最满意答案
这对我有效:
配置文件(不需要反斜杠):
--alpha 3 --beta 5 --gamma 5
MYPROG:
#!/bin/bash echo "arg1=$1" echo "arg2=$2"
Makefile文件:
# define the newline as a multi-line variable define \n endef # Convert newlines to spaces in $(ARGS) MK_ARGS := $(subst ${\n}, , $(ARGS)) # MK_ARGS := $(shell echo "$(ARGS)") # A more expensive way all: @echo "MK_ARGS=$(MK_ARGS)" @bash myprog -switch "$(MK_ARGS)"
运行
make ARGS="$(< config)"
:MK_ARGS=--alpha 3 --beta 5 --gamma 5 1=-switch 2=--alpha 3 --beta 5 --gamma 5
This worked for me:
Configuration file (backslashes not needed):
--alpha 3 --beta 5 --gamma 5
myprog:
#!/bin/bash echo "arg1=$1" echo "arg2=$2"
Makefile:
# define the newline as a multi-line variable define \n endef # Convert newlines to spaces in $(ARGS) MK_ARGS := $(subst ${\n}, , $(ARGS)) # MK_ARGS := $(shell echo "$(ARGS)") # A more expensive way all: @echo "MK_ARGS=$(MK_ARGS)" @bash myprog -switch "$(MK_ARGS)"
Run result of
make ARGS="$(< config)"
:MK_ARGS=--alpha 3 --beta 5 --gamma 5 1=-switch 2=--alpha 3 --beta 5 --gamma 5
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
有没有办法从Makefile中将“$ @”写入新文件?(Is there a way to write “$@” to a new file from a Makefile?)[2023-10-16]
$$是逃避$ for Make的正确方法,但结果随后由Bash扩展。 试试这个: @echo 'java Program $$@' >> exec Bash中的单引号意味着变量不会扩展。 $$ is the correct way to escape the $ for Make, but the result is then being expanded by Bash. Try this: @echo 'java Program $$@' >> exec Single quotes in Bash ... -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
我不太清楚你在问什么,但是使用-f命令行选项只是指定一个文件 - 它不会告诉make来更改目录。 如果要在另一个目录中执行此工作,则需要cd到目录: clean: cd gtest-1.4.0 && $(MAKE) clean 请注意, Makefile中的每一行都在单独的shell中运行,因此不需要将目录更改回来。 I'm not really too clear what you are asking, but using the -f command line option just spe ...
-
这是试图改善@ nobar的伟大方法如下: 使用更强大的命令来提取目标名称,希望能够防止任何错误的肯定(并且也避免了不必要的sh -c ) 不总是在当前目录中定位makefile; 尊重使用-f
显式指定的makefile 排除隐藏的目标 - 按照惯例,这些目标的名称既不用字母也不是数字 做一个单一的假目标 使用@将命令前缀,以防止在执行前被回显 奇怪的是,GNU make没有列出在makefile中定义的目标的名称的功能。 -p选项产生包含所有目标的输出,但是将它们埋在很多其他信息中。 将以下 ... -
使用makefile编译和运行(compile and run with makefile)[2023-11-04]
你可以这样做: 在makefile编辑你的行就像这样 do: run ./run ${nu} 然后拨打电话 make do nu=20 当你打电话给它时,这个nu将是20 ,当你打电话给make而不提供nu make do nu将是15 (正如你在makefile声明的那样,默认值) You can do it like this: Edit your lines in makefile to be like this do: run ./run ${nu} And then d ... -
如何使用另一个文件中的参数列表运行Makefile(How to run a Makefile with a list of arguments from another file)[2022-03-21]
这对我有效: 配置文件(不需要反斜杠): --alpha 3 --beta 5 --gamma 5 MYPROG: #!/bin/bash echo "arg1=$1" echo "arg2=$2" Makefile文件: # define the newline as a multi-line variable define \n endef # Convert newlines to spaces in $(ARGS) MK_ARGS := $(subst ${\n}, , $(ARGS)) ... -
-MM已经生成了makefile格式的依赖关系,所以你可以通过为每个.cpp生成一个相同的文件,然后只是做一个“-include $(DEPS_FILE)”来简化它。 这可能比使用eval更可维护。 -MM will already generate the dependencies on a Makefile format so you could simplify this by generating the dependencies for each *.cpp into a same file, t ...
-
./assign4a 。 您的makefile将构建程序并将可执行文件assign4a放入工作文件夹。 而且,你的makefile是错误的。 它应该是g++ $(CFLAGS) assign4a.cpp -o assign4a.o和g++ $(CFLAGS) list.cpp -o list.o ./assign4a. Your makefile will build the program and put a executable assign4a to the working folder. And, ...
-
您可以使用包含传递给所有目标的通用Makefile变量MAKECMDGOALS 。 请尝试这个变种 CC = g++ CFLAGS = -Wall -g MAKECMDGOALS := $(filter-out clean, $(MAKECMDGOALS)) .PHONY: $(MAKECMDGOALS) $(MAKECMDGOALS): $(CC) $(CFLAGS) $@.c -o Main-$@ clean: rm -f *.o 这里的线 $(MAKECMDGOA ...