
spaceclown
|
| Posted: 06/25/2002, 5:49 AM |
|
I am using Access 2k and ASP w.templates. This is the asp page I made outside of CC but I cant get it to work in CC w/templates, I actually want this to be my header. This page works great with the below code. I have tried doing it as an include but I receive an error.
This is a dhtml menu some what like Ken Hardwicks. I will make available when i am done.
<%@LANGUAGE = "JAVASCRIPT"%>
<html>
<head>
<title>ASP DHTML MENU</title>
<link rel="STYLESHEET" type="text/css" href="menu.css">
<script language="JavaScript1.2" src="menuguts.js">
</script>
</head>
<body>
<script language="JavaScript1.2" src="menuprettys.js"></script>
<script>
<%
function readItemsFromDatabase(){
var db ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("database/testmenu.mdb")
var q = "SELECT menuID,mName,mLink,parent from tblMenu ORDER BY parent,menuID ASC"
var rs=Server.CreateObject("ADODB.Recordset")
rs.CacheSize = 25;
rs.CursorType = 3
rs.LockType = 3
rs.Open(q,db)
if(!rs.EOF){
var rsarr = rs.GetRows();
rsarr = rsarr.toArray();
var cols= rs.Fields.Count
}else var rsarr=new Array()
rs.close()
rs = null
var menuID,mName,mLink,parent
for(row=0;row<rsarr.length;row+=cols){
menuID = "m" + rsarr[row]
mName = rsarr[row+1]
mLink = String(rsarr[row+2])
if(mLink=="null") mLink=""
parent = rsarr[row+3]
if(parent!=0) parent = "m" + parent
else parent=""
Response.write("oCMenu.makeMenu('"+menuID+"','"+parent+"','"+mName+"','"+mLink+"')\n")
}
}
readItemsFromDatabase()
%>
oCMenu.construct()
</script><div align="top">
<center>
<table border="1" width="100%" height="160" bgcolor="#FFFFFF" bordercolor="#FFFFFF" align="top">
<tr>
<td width="80" height="80" bgcolor="#99CCFF"> </td>
<td width="80" height="80" background="design/mypic.jpg"> </td>
<td height="80" colspan="3">
<img border="0" src="design/anotherpic.jpg" width="175" height="79" align="left"></td>
<td height="80" colspan="3">
</td>
</tr>
<tr>
<td width="80" height="80" bgcolor="#CC0000"> </td>
<td width="80" height="80" bgcolor="#008080"> </td>
<td width="80" height="80" bgcolor="#FFFF99"> </td>
<td width="80" height="80" bgcolor="#660066"> </td>
<td height="80" colspan="4"> </td>
</tr>
<tr>
<td width="80" height="20"> </td>
<td width="80" height="20">
</td>
<td width="80" height="20">
</td>
<td width="80" height="20">
</td>
<td height="20" width="80"> </td>
<td height="20" width="80"> </td>
<td height="20" width="80"> </td>
<td height="20"> </td>
</tr>
</table>
</center>
</div>
</body></html>
|
|
|
 |
Efren Lugo
|
| Posted: 07/12/2002, 2:53 PM |
|
Maybe in Code Charge Code Order and style make you code dont fit to be included...
why dont make your header in codecharge and add the html design...
I think it would work well...
|
|
|
 |
|

|