Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
forwarding from one web page to another

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#WebFwd or http://www.notesninjas.com/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.

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
man and boy by Tony Parsons
British book of the year 2000. Great book, hard to put down, but I nearly threw it away half way through. You'll know why when you read it.
See at: Amazon.co.uk | Amazon.com |