Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
ASP question on includes |
Page: 1 | Reply |
Jan 20th 2004 | #138704 Report |
Member since: Jun 5th 2003 Posts: 93 |
Ok, this is the first time I've worked with .asp tags, so be gentle! Basically, I'm including a left navigation like this: #INCLUDE FILE="includes/leftnav.inc" The only problem is on certain pages of the left nav, the link needs to change color. Example: user clicks "shoes" on the left nav, they are taken to the shoes page...now the "shoes" link should be blue instead of its regular gray color. I know how to do this with PHP, but I'm not sure with asp. Any suggestions? Heres how I'd do it with PHP...does ASP work similar? : if( $PHP_SELF == "shoes.asp" ){ echo "tags to make the link blue"; } else { echo "tags to make the link the regular gray color" } Obviously the above does not work as is, but just to get the idea of what I'm talking about, and to see if there is a ASP equilv. |
Reply with Quote Reply |
Jan 21st 2004 | #138714 Report |
Member since: Jun 5th 2003 Posts: 93 |
currentPage = Request.serverVariables("PATH_INFO") if currentPage="shoes.asp" then Response.Write "class=blue" else Response.Write "class=left_nav" end if Just a shot in the dark, and I havn't tested it yet...but what do ya think? Is the correct way to go about it? I'd put that script int he <td> tag. Edit : Your table data tag sure messed up the whole layout |
Reply with Quote Reply |
Jan 21st 2004 | #138725 Report |
Member since: Mar 24th 2001 Posts: 3734 |
[PHP] <% Dim CurrentPage CurrentPage = Request.serverVariables("PATH_INFO") IF CurrentPage = "shoes.asp" Then %> class="blue" <% Else %> class="yellow" <% End If %> [/PHP] Make sure that if you need to do this multiple times on one page that you use something other than CurrentPage for the variable. I usually use numbers after the variable for simplicity and for on-the-go commenting |
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |