LuNaTiK
03-11-2002, 01:51 AM
hi...I finally got my menu to work...*phew* took longer than I thought...but anyhoo, I need to know how to not open a new window for a certain item in the menu. Here is my code. I'm retrieving the SELECT VALUES from a database...so like for the heading...I don't want any window to open because there ain't any link there. hope I'd explained this well. Thanks.
<SCRIPT LANGUAGE="javaScript">
<!--
function openWin(url)
{
window.open(url)
}
-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="frmIndex">
<SELECT name = "mnuSites" onChange="openWin(document.frmIndex.mnuSites.options[mnuSites.selectedIndex].value)">
<%
dim rsSites
dim query
set rsSites = Server.CreateObject("ADODB.Recordset")
query = "select * from tblSites"
rsSites.Open query, objConn, adOpenDynamic, adLockReadOnly, adcmdText
do while not rsSites.EOF%>
<option value="<%=rsSites("Site_Address")%>"> <%=rsSites("Site_Title")%> </option>
<% rsSites.MoveNext
loop
%>
</select>
<%
rsSites.Close
objConn.Close
set rsSites = nothing
set objConn = nothing
%>
<SCRIPT LANGUAGE="javaScript">
<!--
function openWin(url)
{
window.open(url)
}
-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="frmIndex">
<SELECT name = "mnuSites" onChange="openWin(document.frmIndex.mnuSites.options[mnuSites.selectedIndex].value)">
<%
dim rsSites
dim query
set rsSites = Server.CreateObject("ADODB.Recordset")
query = "select * from tblSites"
rsSites.Open query, objConn, adOpenDynamic, adLockReadOnly, adcmdText
do while not rsSites.EOF%>
<option value="<%=rsSites("Site_Address")%>"> <%=rsSites("Site_Title")%> </option>
<% rsSites.MoveNext
loop
%>
</select>
<%
rsSites.Close
objConn.Close
set rsSites = nothing
set objConn = nothing
%>