Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Newbie question about menu bar

Reply
Thread Tools

Newbie question about menu bar

 
 
Martien van Wanrooij
Guest
Posts: n/a
 
      02-15-2004
I am rather new to asp and tried the following script in order to create a
list of menu items where the item referring to the current page should not
be act like a link.

<%
sub maakSubLinkWaarNodig (strUrl, strOmschrijving)
strDezePagina = Request.ServerVariables("SCRIPT_NAME")
if instr(strDezePagina, strUrl) > 1 then
response.write "<span class = currentPage>"& strOmschrijving &
"</span><br><br>"
else
response.write "<a href =" & strUrl & ">" & strOmschrijving &
"</a><br><br>"
end if
end sub
%>


Its behaviour is a little bit unpredictable. I am trying in at
www.cbsreizen.nl/test but it seems to work only on the pages related con
"Roses" .
I also tried the instr function with larger then zero, same result. When I
add for testing purposes response.write strDezePagina, the correct page
including a part of the path is represented.
A second question: is it possible to retrieve only the name of the document
itself _without_ the path, it can be done in php but I couldn't find a
similar ASP function.
Thanks for any comment.

Martien van Wanrooij


 
Reply With Quote
 
 
 
 
Vilmar Brazão de Oliveira
Guest
Posts: n/a
 
      02-16-2004
hi, i don't know if this can help you, but try make a download of aascripter
in http://www.aascripter.com because you can construct a lot of menus with
it.
bye
--



««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"Martien van Wanrooij" <> escreveu na mensagem
news:NyNXb.347$EV2.2908@amstwist00...
> I am rather new to asp and tried the following script in order to create a
> list of menu items where the item referring to the current page should not
> be act like a link.
>
> <%
> sub maakSubLinkWaarNodig (strUrl, strOmschrijving)
> strDezePagina = Request.ServerVariables("SCRIPT_NAME")
> if instr(strDezePagina, strUrl) > 1 then
> response.write "<span class = currentPage>"& strOmschrijving &
> "</span><br><br>"
> else
> response.write "<a href =" & strUrl & ">" & strOmschrijving &
> "</a><br><br>"
> end if
> end sub
> %>
>
>
> Its behaviour is a little bit unpredictable. I am trying in at
> www.cbsreizen.nl/test but it seems to work only on the pages related con
> "Roses" .
> I also tried the instr function with larger then zero, same result. When I
> add for testing purposes response.write strDezePagina, the correct page
> including a part of the path is represented.
> A second question: is it possible to retrieve only the name of the

document
> itself _without_ the path, it can be done in php but I couldn't find a
> similar ASP function.
> Thanks for any comment.
>
> Martien van Wanrooij
>
>



 
Reply With Quote
 
 
 
 
Martien van Wanrooij
Guest
Posts: n/a
 
      02-16-2004
Vilmar and Peter, thank you both for your help, but I found the reason for
the error and I must have been sleeping the other day
Well, I noticed that for the required document name parameter in some cases
by mistake I started with a space after the first. quotation mark so instead
of maakSublinkWaarNodig "mypage.html","go to my page"
I wrote " mypage.html" , "go to my page".
Obviously a statement like <a href = " mypage.html"> works in spite of the
initial space and of course the string searching fails...
Sorry for the incovenience, I thought it was fair to tell you the result...

Martien.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to hide toolbar, menu bar, address bar, other non-essentials. Tim Javascript 1 01-18-2005 08:18 PM
disable title bar, status bar, and address bar of a window Matt HTML 9 08-23-2004 07:49 PM
javascript to disable the title bar, status bar, and address bar of a window Matt Javascript 9 08-23-2004 01:23 PM
Re: disable title bar, status bar, and address bar of a browser window John Hann ASP .Net 0 08-21-2004 05:07 AM
disable title bar, status bar, and address bar of a browser window Matt ASP .Net 0 08-21-2004 03:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57