March 21st, 2003, 12:05 PM
startAt - stopAt problem
Ok, I am having trouble getting this to do what it should.. which is to set NavID as the directory name from the link... any ideas?
Sub WriteFooterLink( link, pageTitle, pageDescription )
startAt = InStrRev ( link, "/" )
stopAt = InStr( startAt, link, "/" )
If stopAt = 0 Then
nav = link
nav = Mid( link, startAt, stopAt-startAt )
here is the footer link it calls the 'link' from
<%WriteFooterLink "/home/about_us.asp", "ABOUT US", "about us"%>
I want it to startAt the first / and stop at the second / so that home as the directory would be the navID
March 22nd, 2003, 08:28 PM
Why is the startAt using InStrRev?! This looks for the last occurrence of / not the first one.
March 23rd, 2003, 04:39 AM
aye, the penny has now dropped thanks.