有谁知道从 Lotus Domino Web 查询开放代理重定向到另一个网页的方法?打印语句似乎不起作用。一个可能的解决方法将非常感激!
关于这个主题的东西可以在这里找到,但看起来有点像这样
链接。
可以不用JavaScript和对文档形式进行重大重新设计来完成吗?
提前致谢。
Does anyone know a way of redirecting to another webpage from lotus domino web query an open agent? The print statement does not seem to work. A possible workaround would be very appreciated!
Something on that subject can be found here but it seems kind of flaky like this
link.
Can it be done without JavaScript and major redesign of document form?
Thanks in advance.
发布评论
评论(7)
您确实意识到 4/5 论坛已经过时了近十年,对吗?如果您使用的是较新版本的 Notes/Domino,我会查看 6/7 论坛(如果您使用的是该版本,甚至可以查看 8,因为它是如此不同);这是“webqueryopen 重定向”的搜索结果;还有很多可能的答案。
Notes 6/7 论坛结果
对于您的实际问题,最简单的答案是 此处 和 这里。
You do realize that the 4/5 forum is almost a decade out-of-date, right? If you're using a more recent version of Notes/Domino, I'd check the 6/7 forum (or even the 8 if you're on that release, since it's so different); here's the search results for "webqueryopen redirect"; there are a lot more possible answers.
Notes 6/7 forum results
The simplest answers to your actual question are here and here.
最好直接写入“location:”标头,这样可以避免使用 Javascript 和元标记。
Better to wite to 'location:' header directly, as avoids Javascript and meta-tags.
这是来自您指向的线程上的响应之一,应该可以正常工作 - 让 WQO 代理只需写入表单上的隐藏字段即可。这将执行客户端重定向,因此您将两次访问服务器。
This is from one of the responses on the thread you pointed to and should work fine - have the WQO agent simply write to a hidden field on the form. This will do a client-side redirect, so you'll get two trips to the server.
WQO 代理中的一行代码可以解决这个问题,但请注意,它仍然在重定向之前加载页面:
Call s.Documentcontext.Replaceitemvalue("$$HTMLHead", {"})
A line of code in WQO agent does the trick, but note it still loads the page before the redirect:
Call s.Documentcontext.Replaceitemvalue("$$HTMLHead", {<meta http-equiv="REFRESH" content="0;url=http://www.etfos.hr">"})
在您的代理中,只需执行以下操作
打印|[| &必需的URL & |]|
in your agent, simply do the following
print |[| & requiredURL & |]|
尝试查看您是否确实需要打开文档而不是运行代理并在 Query_String 中传递参数,
我认为 wqo 无法重定向到另一个页面,因为它最终会将您重定向到您打开或正在创建的文档。我可能是错的,但昨天我试图根据传递给 OpenCorm url 命令的参数做一件事或另一件事,看起来虽然它正在运行代理,但 pw.println() 命令没有其行为与 WQS 代理相同。
如果您不需要打开文档,请尝试运行代理并将参数传递给它
Try to see if you really need to open the document instead of running an agent and pass the params in the Query_String
I think that wqo cannot redirect to another page as it will end up redirecting you to the document you either opened or are creating. I may be wrong but yesterday I was trying to either do one thing or the other based on the params I was passing to the OpenCorm url command and it seems that although it is running the agent, the pw.println() command doesn't behave the same as if it was a WQS agent.
If you don't need to open a document, try running an agent and pass the params to it
正确的方法是使用一条 print 语句,并将要重定向到的 URL 放在括号中。这将在服务器上生成 302 重定向。
示例代码:
有些人建议Meta Refresh。 W3C 不鼓励这样做。请参阅以下链接:
http://en.wikipedia.org/wiki/Meta_refresh#Usability
The proper way to do it is to have one print statement with the URL you want to redirect to in brackets. This will generate a 302 REDIRECT on the server.
Example code:
Some people have suggested Meta Refresh. This is discouraged by the W3C. See the following link:
http://en.wikipedia.org/wiki/Meta_refresh#Usability