Good day folks,
I have posted some code here and I have a question as to which way is best or if what we want to do is possible.
This site I’m working on is done in frames, and here is a sample of our navigation menu code. Also the information that loads after a navigation option is picked comes from a database.
My question to you is:
Is it possible to use the <A href to not only load the menu but to also load a page in a different frame at the same time? If so or if not what would you suggest.
Thanks in advance.
<%@LANGUAGE=”VBSCRIPT”%>
<%Option Explicit%>
<%’set to no caching on client browser or proxy
response.expires=0
Response.CacheControl=”PUBLIC”
%>
<%
‘<!–#include file=”adovbs.inc”–>
‘<!–#include file=”vbutil.inc”–>
Dim NavMode,PMode,SMode,QMode,HMode,NMode,nSign’, strUA, textSize
‘strUA = Request.ServerVariables(“HTTP_USER_AGENT”)
‘if InStr( strUA, “MSIE”) Then
‘textSize = “xx-small;”
‘else
‘textSize = “x-small;”
‘end if
if session(“Wel”)=”1″ then
NavMode=””
end if
if session(“Wel”)=”2″ then
NavMode=”EXABOUTUS”
end if
if session(“Wel”)=”3″ then
NavMode=”EXCOURSES”
end if
if session(“Wel”)<>”1″ and session(“Wel”)<>”2″ and session(“Wel”)<>”3″ then
NavMode = Request.QueryString(“NavMode”)
PMode=request.querystring(“PMode”)
SMode=request.querystring(“SMode”)
end if
session(“Wel”)=”0″
NavMode=”EXCOURSES”
‘***************
‘* ‘Connection DECLARATION
‘***************
Dim strConn
Dim objConnection
Set objConnection = Server.CreateObject(“ADODB.Connection”)
strConn = “Provider=SQLOLEDB; Data Source=CLIENTELE; Initial Catalog=PCWeb; User ID=Web; Password=”
objConnection.Open strConn
%>
<html>
<head>
<link rel=”stylesheet” type=”text/css” href=”menu.css”>
<LINK REL=”SHORTCUT ICON” HREF=”portage.ico”>
<meta NAME=”GENERATOR” Content=”Microsoft FrontPage 5.0″>
<title>Portage College Menu</title>
</head>
<body>
<script type=”text/javascript” language=”JavaScript”></script>
<table border=”1″ cellpadding=”1″ cellspacing=”1″ align=”left” bordercolor=#ffffff width=’165′>
<tr>
<td>
</td>
</tr>
<!– PROGRAMS –>
<%if NavMode = “EXCOURSES” Then%>
<tr >
<td onMouseOver=”id=’lightbg'” onMouseOut=”id=’darkbg'” >
<A href=”menu.asp?NavMode=EXCOURSES&PMode=Acad”>Learning & Employment Foundations</A>
</td>
</tr>
<%IF PMode=”Acad” THEN
‘***********************
‘
‘
‘Declare Recordset & Recordset object
Dim objAUProgram
Set objAUProgram = server.CreateObject(“ADODB.Recordset”)
‘Declare SQL statement and Open String
Dim strAUProgram
strAUProgram = “select distinct offering_desc, program_grp_id as program_grp_id, rtrim(program_id) as program_id from aemprogramoff where program_grp_id = ‘AU’ AND date_to >= getdate() and status = ‘N’ and program_id not like ’32’ and program_id not like’30’ order by offering_desc ASC”
objAUProgram.Open strAUProgram, objConnection
‘Check for Records
if objAUProgram.BOF or objAUProgram.EOF then
Response.Write “No Program available.”
else
‘Move Recordset to first record
objAUProgram.MoveFirst
‘****** NOTES *******”SHOW ‘OFFERING_DESC’ BUT HIDE PROGRAM_GRP_ID AND PROGRAM_ID
‘Want to bring in three columns, but just want to show one…this way I can use the other two variables
‘that I brought in to pass to the main asp page
DO WHILE NOT objAUProgram.EOF
%>
<tr><TD> -
<a href=”ProgDisplay.asp?pgi=<%=objAUProgram(“program_grp_id”)%> &pi=<%=objAUProgram(“program_id”)%> ” target=’Content’ onMouseOver= “id=’fontchange'”>
<%Response.Write objAUProgram(“offering_desc”)%></a></td></tr><%
‘Advance to next record in Recordset
objAUProgram.MoveNext
Loop
end if
END IF’PMode=”Acad”
%>
<tr>
<td onMouseOver= “id=’lightbg'” onMouseOut= “id=’darkbg'”>
<A href=”menu.asp?NavMode=EXCOURSES&PMode=UniStud”>University Studies</A></td>
</tr>