|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
trim var problems...my brain has left me
Ok... I cant for the life of me think of how to set this up
<a href="<%=subNavUrl%>" class="subNavLink"><%=LCASE( Replace( pageTitle, "_", " " ) )%></a> : so that the : is not display at the end of the last item in the list. My links are called from a sub, but thats not relevant to this question. A link is as follows: <%WriteSubNav "/home/home.asp", "newsfeeds", "view our newsfeeds from around the world"%> any help appreciated. |
|
#2
|
||||
|
||||
|
passing a boolean parameter to define if the : should be written or not seems like a simple solution.
If there is no way for you to find out when is the call going to be the last one, you could reverse it, so you would only have to worry about finding out when is the call going to be for the first one, instead of writing <a>...</a> : make it write :<a>...</a> except for the first one where you write <a>....</a> I hope this is of any help. |
|
#3
|
||||
|
||||
|
putting it in front of the first one would be much easier as I cant really determine how many there are using the string I have at the moment.
How do I determine the first. <% if num >1 the : else end if %> does not work as obviously there is no num var... |
|
#4
|
||||
|
||||
|
Create One
At the begining of the page create a variable ..
probably boolean ... set it to False and when you are writing the link check if the variable is true or false .. if it is true, write the : at the begining if it is false don't write the : and after the write, set the variable to true, so the very first write will find the variable false and the rest will find it true. I hope this is of nay help. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > trim var problems...my brain has left me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|