|
-
Mar 15th, 2000, 11:11 PM
#1
Thread Starter
Member
I am trying to create a navagation system using db populated drop down boxs that double as jump boxes what I mean by that is they are on the left frame of the site and they click on one of the options in the db populated dropdown boxes the link is brought up in the main frame...
Below is the url to the site and the code...
url: http://www.hytech-wholesale.com
code:
<%@ Language=VBScript %>
<%
set conn = server.createobject ("adodb.connection")
conn.open "DBSOURCE"
set RSBoxOne = conn.Execute("SELECT Category, SortOrder, Description, URL FROM MainLinks WHERE (([MainLinks]![Category]='1')) ORDER BY SortOrder")
set RSBoxTwo = conn.Execute("SELECT Category, SortOrder, Description, URL FROM MainLinks WHERE (([MainLinks]![Category]='2')) ORDER BY SortOrder")
set RSBoxThree = conn.Execute("SELECT Category, SortOrder, Description, URL FROM MainLinks WHERE (([MainLinks]![Category]='3')) ORDER BY SortOrder")
set RSBoxFour = conn.Execute("SELECT Category, SortOrder, Description, URL FROM MainLinks WHERE (([MainLinks]![Category]='4')) ORDER BY SortOrder")
set RSBoxFive = conn.Execute("SELECT Category, SortOrder, Description, URL FROM MainLinks WHERE (([MainLinks]![Category]='5')) ORDER BY SortOrder")
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function leapto(form) {
var myboxone=myform1.BoxOne.selectedIndex
parent.mainFrame.location.href=(myform1.BoxOne.options[myboxone].value);
var myboxtwo=myform1.BoxTwo.selectedIndex
parent.mainFrame.location.href=(myform1.BoxTwo.options[myboxtwo].value);
}
// End -->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" background="images/background.jpg">
<table width="129" border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#333333">
<tr>
<td><img src="images/logo.gif" width="126" height="58"></td>
</tr>
</table>
<form name="myform1">
<p>
<select name="BoxOne" size=1 onChange="leapto(this.form)">
<option value="" selected>Welcome</option>
<% Do While Not RSBoxOne.EOF %>
<option value="<% = RSBoxOne("URL") %>"><% = RSBoxOne("Description") %></option>
<% RSBoxOne.movenext %><% loop %>
</select>
</p>
<select name="BoxTwo" size=1 onChange="leapto(this.form)">
<option value="" selected>Products</option>
<% Do While Not RSBoxTwo.EOF %>
<option value="<% = RSBoxTwo("URL") %>"><% = RSBoxTwo("Description") %></option>
<% RSBoxTwo.movenext %><% loop %>
</select>
</form>
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|