ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old March 21st, 2003, 11:05 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
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

Reply With Quote
  #2  
Old March 22nd, 2003, 07:28 PM
yassoor's Avatar
yassoor yassoor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada - Egypt
Posts: 60 yassoor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
InStrRev

Why is the startAt using InStrRev?! This looks for the last occurrence of / not the first one.
__________________
I hope this is of any help to anyone.

Yassoor
http://www.WebsitesCreation.ca

Reply With Quote
  #3  
Old March 23rd, 2003, 03:39 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
aye, the penny has now dropped thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > startAt - stopAt problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway