Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

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 ASP Free Forums Sponsor:
  #1  
Old June 22nd, 2004, 05:26 AM
Totem Totem is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 Totem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 2 sec
Reputation Power: 0
ASP menu help

How do I transform this horizontal menu into a vertical one?

<-------Horizontal menu -------------->

<%Sub DrawNavigation (aLinks,aLinksHREF)%>
<table border=0 bgcolor=#000000 cellspacing=0 cellpadding=0 WIDTH="100%"> <tr>
<%

intLastLink = 1

If Len(Request.Querystring("Link")) then
intLastLink = Request.Querystring("Link")
end if

For I = 0 to uBOUND(aLinks)
If intLastLink-1 = I then%>
<td align="center" bgcolor="#669999"><b><%=aLinks(I)%></b>&nbsp;</td>
<%else%>
<td align="center">
<a STYLE="text-decoration:none;color:#FFFFFF;" href="<%=aLinksHREF(I) &"?link=" &I+1%>"
onmouseover="style.color='#FF0000'" onmouseout="style.color='#FFFFFF'"><%=aLinks(I)%></a>&nbsp;</td>
<%end if
Next%>
<tr><td bgcolor="#669999" COLSPAN=<%=Ubound(aLinks)+1%>>&nbsp;</td></tr>
</tr></table>
<% End Sub%>

<%
'************************************************* ***********************
'aLinkNames(n) = User Defined array with text that will be displayed in the
' tabs
'aHREF(n) = HREF link to a corresponding page
'************************************************* ***********************

aLinkNames = array("Link1","Link2","Link3","Link4","Link5","Link6")
aHREF = array("default.asp","page2.asp","page3.asp","page4.asp","page5.asp","page6.asp")

DrawNavigation aLinkNames,aHREF

%>

Thanks.

Reply With Quote
  #2  
Old June 22nd, 2004, 11:51 AM
scrubs scrubs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 42 scrubs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Put a <tr> after the "If intLastLink ... " statement and a </tr> before the "end if" for that block.
Also, remove the <tr> that's right after your <table border=0 ...
and the </tr> before the </table>

Reply With Quote
  #3  
Old June 22nd, 2004, 11:58 AM
scrubs scrubs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 42 scrubs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Actually, you should have a <tr> ... </tr> for each statement block of the if...then...else

For I = 0 to uBOUND(aLinks)
If intLastLink-1 = I then%>
<tr>
<td align="center" bgcolor="#669999"><b><%=aLinks(I)%></b>&nbsp;</td>
</tr>
<%else%>
<tr>
<td align="center">
<a STYLE="text-decoration:none;color:#FFFFFF;" href="<%=aLinksHREF(I) &"?link=" &I+1%>"
onmouseover="style.color='#FF0000'" onmouseout="style.color='#FFFFFF'"><%=aLinks(I)%></a>&nbsp;</td>
</tr>
<%end if
Next%>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > ASP menu help


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 6 hosted by Hostway