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
Beginning Java Web Services by Andre Tost, Henry Andre Bequet, Meeraj Kunnumpurath, Sean Rhody
Web services are no longer a nascent technology in the programming industry; every major software vendor is rolling out web services-related APIs and products. Today Java developers are successfully adopting web services as the latest technology in application development in order to enable...
See at: Amazon.co.uk | Amazon.com |