logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-09-2008, 01:24 PM   #1
Climbing on board
 
Join Date: Dec 2008
Location: Cardiff
Posts: 2
Default asp drop down menus - help

Hi,

I have been trying to figure out how someone else made these drop down menus using asp in Dreamweaver for a site I now have to maintain. I will say now I have no experience of asp or much coding at all, just trying to get into it. Been working through some tutorial but found nothing which helps.

Anyway I have a page with a side navigation that has 2 step levels of drop down menu's. I have figured out how it all works but not sure if this ("stands_graphics_tools") references to anything else and now I need to add an extra section and cannot get it to working. Do I need to add a script somewhere else?

This is the code:
HTML Code:
<% If  script_name = "stands_graphics_tools" Then %>
                                 <tr> 
          <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 %><td colspan="2" align="left" valign="middle" class="navCellOff" onmouseover="this.className='navCellOn';" onmouseout="this.className='navCellOff';"><% End if %>
        &nbsp;&nbsp;&nbsp;<a href="stands_graphics_tools.asp" class="navLink">Stands, Graphics &amp; Tools  </a></td>
        </tr>
        <tr> 
          <td colspan="2" align="left" valign="middle"><img src="images/navspacer_02.gif" width="153" height="1" /></td>
        </tr>
        
        <% If  script_name = "stands_graphics_tools" Then %>
        <!--#include file="_sidebar_stands_graphics_tools.asp" -->     
        <% End if %>
Thank you in advance and sorry for my lack of experience. I am super willing to learn so if you think I should do learning first then try and solve this later please don't be shy to say.

Last edited by davidj; 12-11-2008 at 04:01 PM..
Climbing on board is offline   Reply With Quote
Old 12-14-2008, 02:26 AM   #2
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

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

Code:
<% 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.

                                 <tr> 
        <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>
        </tr>
        <tr> 
          <td colspan="2" align="left" valign="middle"><img src="images/navspacer_02.gif" width="153" height="1" /></td>
        </tr>
        
   
<% 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.

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


Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 06:44 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com