SourceTec Software

It is currently Thu Apr 17, 2014 1:12 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Help with Codes
PostPosted: Wed Jun 10, 2009 2:00 pm 
Offline
Member

Joined: Wed Jun 10, 2009 1:54 pm
Posts: 1
I am not a good coder, Please help.

I am using dreamweaver and when I run it on my browser I get an error on line 39 ";" specifically on this line: <%
While Not resCat.EOF
sCatName=<%=(resCat.Fields.Item("NAME").Value)%>
%>

I am sure it is not the only error, I hope someone can help me correct my codes. Here they are:

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="PTT.asp" -->
<%
var resCat_cmd = Server.CreateObject ("ADODB.Command");
resCat_cmd.ActiveConnection = MM_PTT_STRING;
resCat_cmd.CommandText = "SELECT * FROM dbo.Table1";
resCat_cmd.Prepared = true;

var resCat = resCat_cmd.Execute();
var resCat_numRows = 0;
%><%
var rsProduct_cmd = Server.CreateObject ("ADODB.Command");
rsProduct_cmd.ActiveConnection = MM_PTT_STRING;
rsProduct_cmd.CommandText = "SELECT * FROM dbo.Table2";
rsProduct_cmd.Prepared = true;

var rsProduct = rsProduct_cmd.Execute();
var rsProduct_numRows = 0;
%>
<!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>
<script type="text/javascript" src="stlib.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

</head>

<body>
<table width="1000" border="1">
<tr>
<td width="300"><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(1,"tree77cb".....)
stBS("p0",[0]);
<%
While Not resCat.EOF
sCatName=<%=(resCat.Fields.Item("NAME").Value)%>
%>

stIT("p0i0",["<%=sCatName%>","",.....)
stBS("p1",[],"p0")

<%
Set rsProduct = Dc.Execute("SELECT * FROM dbo.Table2 WHERE CATID=" & resCat(0))
While Not rsProduct.EOF
sProduct =<%=(rsProduct.Fields.Item("NAME").Value)%>
%>

stIT("p1i0", [,"<%=sProduct%> .....)
<%
rsProduct.MoveNext
Wend
%>
stES();
<% resCat.MoveNext %>
<% Wend %>
stES();
stEM();
//-->
</script>

</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
<%
resCat.Close();
%>
<%
rsProduct.Close();
%>


Thank you for any help


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

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