|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
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 Else nav = Mid( link, startAt, stopAt-startAt ) End If 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 |
|
#2
|
||||
|
||||
|
InStrRev
Why is the startAt using InStrRev?! This looks for the last occurrence of / not the first one.
|
|
#3
|
||||
|
||||
|
aye, the penny has now dropped thanks.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > startAt - stopAt problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|