Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Backward and forward slashes in URLS

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#Slashes or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/Slashes




Notes is always getting into a pickle with forward and backward slashes, depending on the filesystem of the server. (Windows uses the wrong slashes).

This is not a problem for most decent browsers but it can be a problem for Internet Explorer and so here is a neat bit of LotusScript code to make sure the

slashes are all the right way. This can be used for image hrefs as well as URLs.

     Dim s As New notessession
   Dim db As notesdatabase
   Set db = s.currentdatabase
   Dim server As New notesname(db.server)
   
   temp = "http://" & server.common & "/" & db.Filepath & "/Display?openagent&name=HooHaa"
   Msgbox temp
   

    ' Neat bit of code to transpose \ with /  
   While Instr(temp, "\")
        Mid(temp, Instr(temp, "\"),1) = "/"
   Wend
   
   
Msgbox temp

 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 |