views:

93

answers:

3

Doe anyone know a way of redirecting to another webpage from lotus domino web query 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 seem kind of flaky. http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/552ac51dccd42ac785256adc0054f7fc?OpenDocument

Can it be done without JavaScript and major redesign of document form?

Tnx in advance.

A: 

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.

You could use your WQO to set a field on the document called redirect. Set the field to text and hide it from everything. HEre's what you put in the field (with your WQO agent): location.replace('http://www.website.com');

In your HtmlHeadContent, put this formula:

"" + @NewLine + redirect + @NewLine + ""

Ed Schembor
Unfortunately, your suggestion does not work. It only prints the stuff you put in HTML head content but no redirect.
Mihi
I managed to get it to work by adding the following code to body onLoad event:
Mihi
try {var redir = document.getElementById("redirect").value;location.replace(redir);}catch(e) {alert (e.message);}
Mihi
This works but it shows the content of the page for a moment and then redirects.
Mihi
A: 

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.

EmmyS
Offcourse, but the problem is still actual. Even on LND 8.5.2!
Mihi
But thnx for links, they all amount to something and I think I found an even easier solution and it is a one liner in WQO agent: Call s.Documentcontext.Replaceitemvalue("$$HTMLHead", {<meta http-equiv="REFRESH" content="0;url=http://www.etfos.hr">"})
Mihi
No design changes or anything just this code. But it still loads the page first. But that is not to bad.
Mihi
A: 

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"&gt;"})

Mihi