Advertisement

06.11.2008 at 07:37PM PDT, ID: 23478173
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

Passing variables between ASP Include files

Asked by jen4950 in Server Side Includes (SSI), Miscellaneous Web Development, Active Server Pages (ASP)

Tags: , ,

I am trying to make my site easier to maintain, and want to use include files. The idea here is have each segment of code in an include file, and select what page it is for navigation etc. with a simple index number. I have the sitemap in a spreadsheet that exports the case function in ASP, so updating the site will be a breeze.
So how do I get the passing of that variable between these different navX.asp pages to make this concept work?

As you can see, the main page becomes very easy to maintain- Navigation, nav-crumbs across the top, page titles, links etc. are all maintained in my spreadsheet and called with 1 number. This page works fine when it is all put together in one file.. -> http://vacorp.com/common/demo1.asp

I posted the question in the [H]ardforum- been a member there a long time, you can see the post there : http://www.hardforum.com/showthread.php?p=1032603666#post1032603666 -the formatting makes it easier to digest. Start Free Trial
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:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
Main Page:
[CODE]
<!--#include virtual="/common/nav1.asp"-->
 
NavIndex = 7
 
<!--#include virtual="/common/nav2.asp"-->
<!--#include virtual="/common/body1.asp"-->
<!--#include virtual="/common/body2.asp"-->
        	
<div id="mainContent">
           <h1> Main Content </h1>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
                <p>Quisque ornare risus quis  ligula.< /p>
            <h2>H2 level heading </h2>
                <p>Lorem ipsum dolor amet, consectetuer adipiscing elit.</p>
</div>
            
<!--#include virtual="/common/body3.asp"-->
[/CODE]
 
nav1.asp:
[CODE]<%
DIM siteMapLocation, sideNavIndex, NavIndex, topLinks, currentDate
[/CODE]
 
nav2.asp (truncated the CASE options for brevity, there are about 30 options):
[CODE]currentDate = FormatDateTime(date(), 1)
currentTime = FormatDateTime(now(), 3)
 
 
SELECT CASE NavIndex
	CASE 1
	topLinks = "<a href=""/index.asp"">Home</a>"
	sideNavIndex="n01"
	CASE 2
	topLinks = "<a href=""/index.asp"">Home</a> > <a href=""/CS/index.asp"">Customer Service</a>"
	sideNavIndex="n09"
	CASE 3
	topLinks = "<a href=""/index.asp"">Home</a> > <a href=""/CS/index.asp"">Customer Service</a> > <a href=""/CS/Individuals/index.asp"">Individuals</a>"
	sideNavIndex="n09"
	CASE 4
	topLinks = "<a href=""/index.asp"">Home</a> > <a href=""/CS/index.asp"">Customer Service</a> > <a href=""/CS/Dealers/index.asp"">Dealers</a>"
	sideNavIndex="n09"
END Select %>
[/CODE]
 
body1.asp (HTML Header information):
 
[CODE]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
	<head>
		<title>Vehicle Acceptance Corporation - VACorp.com</title>
		<link rel="stylesheet" type="text/css" href="../screenstyles.css" media="screen"/>
        	<link rel="stylesheet" type="text/css" href="../printstyles.css" media="print"/>
        
		<script type="text/javascript" src="../jquery.js"></script>
		<script type="text/javascript" src="../sliding.js"></script>
        <script type="text/javascript" src="../bookmark.js"></script>
        <script type="text/javascript" src="../date.js"></script>
        
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        
[/CODE]
 
body2.asp (side navigation, images, some CSS styling for the side navigation):
 
[CODE]
		<style type="text/css" media="screen">	
			div#bottomLocation {position:relative; left: 0em; top:8em; height:4em; Z-INDEX: 10;}
			ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a {color:#FF0000;}
	        	ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a:hover {color:#FF0000;} 
			ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a span.{color:#FF0000;}
			ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a span.current{color:#FF0000;}
	        	ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a:hover span.current {color:#FF0000;}
		</style>
        
        <style type="text/css" media="print">
			div#bottomLocation {position:relative; left: 0em; top:8em; height:4em; Z-INDEX: 10;}
			ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a {color:#FF0000; background-color:#FFCC33; font-weight:bold;}
	        	ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a:hover {color:#FF0000; font-weight:bold;} 
			ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a span.{color:#FF0000;}
			ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a span.current{color:#FF0000;}
	        	ul#sideNavList li.navLink div.<%response.Write(sideNavIndex)%> a:hover span.current {color:#FF0000;}
		</style>
        
        
	</head>
	<body class="bodyStyle">
    <div id="headerContainer"> 
        	<div class="Logo"><img src="/images/Common/VACLogo_Web.gif" alt="" width="188" height="150" /></div>
            <div class="LogoTail"><img src="/images/Common/VACLogo_WebTail.gif" alt="" width="100%" height="150"/></div>
            <div class="GradientTop"><img src="/images/Common/Gradient_top.jpg" alt="" width="100%" height="180"/></div>
            <div class="VAC"><img src="/images/Common/VAC.gif" alt="Vehicle Acceptance Corporation"/></div>
        	<div class="VACPrint"><img src="/images/Common/VACTopPrint.jpg" alt="Vehicle Acceptance Corporation" width="750"/></div>
            <div class="VACMotto"><img src="/images/Common/CashandServiceSolutions.gif" alt="" width="300" height="47" /></div>
        </div>
        
    	<div class="GreyNavBar"><div class="topNav"><span class="topNavTimestamp"><%response.Write(currentDate)%> - <%response.Write(currentTime)%> - </span><a onClick="window.print()" href="#">Print</a> - <a href="../EMailPage.asp" target="_blank">E-Mail this page</a> - Navigation: 
      <%response.Write(topLinks)%></div>
    </div>
        
<div id="bodyContainer">
            
            <div id="sideNavBlock">
              <ul id="sideNavList">
                    <li class="navLink"><div class="n00"><a>HOME</a></div></li> 
                    <li class="navTitle">For Customers</li>
                    <li class="navLink"><div class="n01"><a href="/contact/index.htm">Update Your Information<span>Provide VAC updates to your current contact or vehicle information.</span></a></div></li>
                    <li class="navLink"><div class="n02"><a href="/payment/index.htm">Make Your Payment<span><img src="file:///E|/Users/jneubauer/Documents/Websites/Vehicleacceptance.com/Current_VAC_Website/Website_05012008/images/common/CC_Small.gif" alt="Visa, Mastercard, AMerican Express, Discover Credit and Debit Cards Accepted" width="70%" height="70%"/>Arrange payments via online ACH, Online Credit or Debit Cards, Pay-By-Phone or Western Union</span></a></div></li>
                    <li class="navLink"><div class="n03"><a href="/payment/index.htm">Request Your Payoff<span>Request the current amount due to payoff your note</span></a></div></li>
                    <li class="navTitle">For Businesses</li>
                    <li class="navLink"><div class="n04"><a href="/repair/index.htm">Repair Industry Services<span>Find out how VAC can help your repair business convert economically challenged traffic into sales</span></a></div></li>
                    <li class="navLink"><div class="n05"><a href="/advance/index.htm">BHPH Cash Advance<span>Independent businesses receive an advance of 3 to 9 months of payments on your notes, while retaining ownership</span></a></div></li>
                    <li class="navLink"><div class="n06"><a href="/servicing/index.htm">BHPH Note Servicing<span>Independent dealers retain ownership of your receivables while allowing us to collect payments and service your contract for you.</span></a></div></li>
                    <li class="navLink"><div class="n07"><a href="/purchasing/index.htm">BHPH Bulk Purchasing<span>Learn more about our bulk note purchasing program</span></a></div></li>
                    <li class="navTitle">For Everyone</li>
                    <li class="navLink"><div class="n08"><a href="/contact/index.htm">Customer Service</a></div></li>
                    <li class="navLink"><div class="n09"><a href="/locations/index.htm">Locations</a></div></li>
                    <li class="navLink"><div class="n10"><a href="/locations/index.htm">VAC News</a></div></li>
                    <li class="navLink"><div class="n11"><a href="/online/index.htm">Online Solutions</a></div></li>
                    <li class="navLink"><div class="n12"><a href="/about/index.htm">About Us</a></div></li>
                    <li class="navTitle">Interactive</li>
                    <li class="navLink"><div class="n13"><a href="/locations.htm">Login</a></div></li>
                </ul>
            </div>
        [/CODE]
 
body3.asp (bottom feedback form, links etc. end of HTML) :
 
[CODE]
            <!-- Bottom set of navigation options, disclaimer, etc.. -->
                        
...
 
            <!-- END OF Bottom Navigation Set -->
            </div>	
		</div>       
</body>
</html>[/CODE]
[+][-]06.12.2008 at 12:27AM PDT, ID: 21766874

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Server Side Includes (SSI), Miscellaneous Web Development, Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: dosth
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.12.2008 at 12:32AM PDT, ID: 21766900

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 07:40AM PDT, ID: 21769955

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 07:52AM PDT, ID: 21770089

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 08:55AM PDT, ID: 21770834

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 09:06AM PDT, ID: 21770961

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.12.2008 at 09:13AM PDT, ID: 21771012

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 09:21AM PDT, ID: 21771097

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.12.2008 at 09:22AM PDT, ID: 21771104

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628