< Back

Document Subject: forwarding from one web page to another
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#WebFwd or http://A555F9/nn.nsf/ByAlias/WebFwd

Need some code to forward a user using an old link to the new link?




There are a few ways to redirect users or forward to a page from another web page:

The first way is easiest and will load the old page first. It can be used aywhere on a form or a page:

<script>
<!-- this code will forward the user to the ninjas page when accessed from the web.-->
<!-- this code should be Text-> Pass -thru html ticked -->
<!-- hide to @ClientType="Notes" -->
location.replace("http://www.notesninjas.com");

</script>

The second way will re-direct or load the other page using meta tags.

The code should be in the $$HTMLHead field

DBName := @Implode(@Explode(@Subset(@DbName;-1);"\\");"/");

"<META http-equiv=\"Refresh\" content=\"0; URL=/"+DBName+"/$about\">"

using this method you can put up a text message such as:

"This database has moved to http://adfos.com blah blah. You will be redirect in 5 seconds."

and change the 0 above to 5 ...

 

The third way is to replace the old database file with a text file that contains either of the text above,

whenever the file is access the code will be run.