View Single Post
Old 12-14-2008, 01:26 AM   #2
mangofreak's Avatar
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444

The ASP code is only been used to show the html conditionally.

<% If  script_name = "stands_graphics_tools" Then %>
The above is saying: if the variable script_name is equal to "stands_graphics_tools" then, run the code below or show the code below.

        <td colspan="2" align="left" valign="middle"><img src="/images/navspacer_01.gif" width="153" height="1" /></td>
        </tr><td colspan="2" align="left" valign="middle" class="navCellOffA" onmouseover="this.className='navCellOn';" onmouseout="this.className='navCellOffA';">

<% Else %>
The Esle above means: otherwise(if the variable script_name is not equal to "stands_graphics_tools" then, run the code below or show the code below.)
        <td colspan="2" align="left" valign="middle" class="navCellOff" onmouseover="this.className='navCellOn';" onmouseout="this.className='navCellOff';">

<% End if %>
And finish here

        &nbsp;&nbsp;&nbsp;<a href="stands_graphics_tools.asp" class="navLink">Stands, Graphics &amp; Tools  </a></td>
          <td colspan="2" align="left" valign="middle"><img src="images/navspacer_02.gif" width="153" height="1" /></td>
<% If  script_name = "stands_graphics_tools" Then %>
This is the same bit instead to run a code it conditionally asks to Include the file called "_sidebar_stands_graphics_tools.asp"

        <!--#include file="_sidebar_stands_graphics_tools.asp" -->     

<% End if %> This indicates the end if that condition.
Basically ASP is not creating the code here but displaying the apropriate code depending on conditions. Hope it helps.

DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote