SourceTec Software

It is currently Sat Apr 19, 2014 10:58 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Aug 28, 2009 8:37 pm 
Offline
Member

Joined: Fri Aug 28, 2009 8:26 pm
Posts: 2
Location: Nairobi, Kenya
Hi guys, am unable to create the tree menus dynamically
below is my code, where could i be going wrong? There page displays no error, but it does not show any menus, just a blank page;

---------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Option Explicit%>
<%
Dim Dbq, Dsn, Dc
Dim rsCat, rsProduct
Dim sCatName, sProduct, sLink

Dbq = Server.MapPath("products.mdb")
Dsn = "driver={Microsoft Access Driver (*.mdb)};pwd=;Dbq=" & Dbq
Set Dc = Server.CreateObject("ADODB.Connection")
Dc.Open Dsn
'Connect with the database.
Set rsCat = Dc.Execute("SELECT * FROM CATEGORY")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>tree</title>
<script type="text/javascript" src="stlib.js"></script>
</head>

<body>
<a href="http://www.dhtml-menu-builder.com" style="display:none;visibility:hidden;">Javascript DHTML Tree Menu Powered by dhtml-menu-builder.com</a>
<script type="text/javascript">
<!--
stBM(290,"tree3a8b",[0,"","","blank.gif",0,"left","auto","auto",0,0,-1,-1,-1,"none",0,"#000000","transparent","","repeat",1,"defButton_f%20.gif","defButton_uf.gif",9,9,1,"line_def02a8a.gif","line_def12a8a.gif","line_def22a8a.gif","line_def32a8a.gif",1,0,3,1,"center",0,0,0,"","","","",""]);
stBS("p0",[0,1,"",-2,"",-2,50,-1,3]);
/*
<%
While Not sCat.EOF
sCatName = rscat("NAME")
%>
*/
stIT("p0i0",["<%=sCatName%> ","","_self","","","defIcon_f.gif","defIcon_uf.gif",18,18,"9pt 'Arial'","#000000","none","transparent","","no-repeat","9pt 'Arial'","#000000","underline","transparent","","no-repeat","9pt 'Arial'","#FFFFFF","none","#000099","","no-repeat","9pt 'Arial'","#FFFFFF","underline","#000099","","no-repeat",1,0,"left","middle",0,0,"","","","",0,0,0]);
stBS("p1",[,0],"p0");
/*
<%
Set rsProduct = Dc.Execute("SELECT * FROM PRODUCTS WHERE CATID=" & rsCat(0))
While Not rsProduct.EOF
sProduct = rsProduct("NAME")
sLink = rsProduct("LILNK")
%>
*/
stIT("p1i0",["<%=sProduct%> ","<%=sLink%>","_self","","","defIcon_c.gif","defIcon_c.gif",18,18,"9pt 'Arial'","#000000","none","transparent","","no-repeat","9pt 'Arial'","#000000","underline","transparent","","no-repeat","9pt 'Arial'","#FFFFFF","none","#000099","","no-repeat","9pt 'Arial'","#FFFFFF","underline","#000099","","no-repeat",1,0,"left","middle",0,0,"","","","",0,0,0]);
/*
<%
rsProduct.MoveNext
Wend
%>
*/
stES();
/*
<%rsCat.MoveNext%>
<%Wend%>
*/
stES();
stEM();
//-->
</script>

</body>
</html>


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 29, 2009 10:24 am 
Offline
Guru

Joined: Wed Jan 31, 2007 4:21 am
Posts: 1116
where is sCat defined?? i se rsCat, but not sCat


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group