Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mystery Error!

Status
Not open for further replies.

stevemarsh99

Technical User
Aug 10, 2005
88
GB
Chaps, nearly there with this page and just need pointing in the right direction. i get this error:

Error Type:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
/ealert/default.asp, line 266

and here is the code...eek!

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ealert.asp" -->
<%
Dim rs_ealert
Dim rs_ealert_numRows

Set rs_ealert = Server.CreateObject("ADODB.Recordset")
rs_ealert.ActiveConnection = MM_ealert_STRING
rs_ealert.Source = "SELECT * FROM tbl_ealert"
rs_ealert.CursorType = 0
rs_ealert.CursorLocation = 2
rs_ealert.LockType = 1
rs_ealert.Open()

rs_ealert_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 10
Repeat1__index = 0
rs_ealert_numRows = rs_ealert_numRows + Repeat1__numRows
%>
<%
' *** Add Current Date To Page ***
' *** RobGT Server Behaviour 101 - By RobGT - ***
Dim tempdaynow, daynow, datenow, tempmonthnow, monthnow, yearnow, RobGT_completedate
tempdaynow = Weekday(Date)
daynow = WeekdayName(tempdaynow)
datenow = Day(Date)
tempmonthnow = Month(Date)
monthnow = MonthName(tempmonthnow)
yearnow = Year(Date)
RobGT_completedate = "" & daynow &", "& datenow &" "& monthnow &" "& yearnow
%>
<%
strToday = dateadd("d", date(), 1)
strMyDate = (rs_ealert.Fields.Item("MAGDATE").Value)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>KHL Digital Magazine eAlerts</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
-->
</style>
<link href="css/Main_page.css" rel="stylesheet" type="text/css">
</head>

<body>
<p>&nbsp;</p>
<table width="583" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td colspan="2" rowspan="2" valign="top"><a href="admin/Sent.asp"><img src="images/khlgroup.gif" width="88" height="65" border="0"></a></td>
<td width="103" height="31">&nbsp;</td>
<td colspan="5" class="DateText"><div align="right"><%=RobGT_completedate%></div></td>
</tr>
<tr>
<td height="40">&nbsp;</td>
<td colspan="5" valign="top" align="right"><img src="images/DIGI_EALERT.gif" width="287" height="31"></td>
</tr>
<tr>
<td height="10" colspan="8" valign="top" class="TopMargin"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="19" valign="top" class="LeftMargin"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td class="WhiteBlank">&nbsp;</td>
<td class="Headings">Up Date </td>
<td class="Headings">Circ lists </td>
<td class="Headings">Adv Lists </td>
<td class="Headings">Digital Copy </td>
<td class="Headings">Editor Text </td>
<td width="17" valign="top" class="RightMargin"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<%If (Repeat1__numRows Mod 2) Then%>
<%
While ((Repeat1__numRows <> 0) AND (NOT rs_ealert.EOF))
%>
<tr bgcolor="#E4EDFA">

<td width="11" height="47" valign="top" class="LeftMargin"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td width="92" class="WhiteBlank"><img src="<%=(rs_ealert.Fields.Item("MAGLOGO").Value)%>" class="ImageBorder" align="left"></td>
<td class="RedNormalText" align="center"><%=(rs_ealert.Fields.Item("MAGDATE").Value)%><br></td>
<td width="89" class="MainNormalText" align="center">


<% IF (rs_ealert.Fields.Item("LIST_CIRC").Value) = "Yes" Then%>
<img src="images/thumbs_up.gif">
<% ElseIf (rs_ealert.Fields.Item("LIST_CIRC").Value) = "No" Then %>
<img src="images/thumbs_down.gif">
<% End IF %>

<%
if strToday = strMyDate and (rs_ealert.Fields.Item("LIST_CIRC").Value) = "No" then
%>
<%
FormFields = "to~body~subject"
If FormFields <> "" Then
arrFormFields = split(FormFields,"~")
End If
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = "eAlert@khl.com"
objCDO.To = (rs_ealert.Fields.Item("LIST_CIRC_CONTACT").Value)
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "KHL eAlert Workflow Reminder...Circulation"
BodyString = Replace("Circulation Lists are not Complete yet","~",chr(13) & chr(10) )& chr(13)

objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send
Set objCDO = Nothing %>

<% else %>

<% Response.Write(" ") %>
<% end if %>

</td>
<td width="88" class="MainNormalText" align="center">

<% IF (rs_ealert.Fields.Item("LIST_ADV").Value) = "Yes" Then%>
<img src="images/thumbs_up.gif">
<% ElseIf (rs_ealert.Fields.Item("LIST_ADV").Value) = "No" Then %>
<img src="images/thumbs_down.gif">
<% End IF %>

<%
if strToday = strMyDate and (rs_ealert.Fields.Item("LIST_ADV").Value) = "No" then
%>
<%
FormFields = "to~body~subject"
If FormFields <> "" Then
arrFormFields = split(FormFields,"~")
End If
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = "eAlert@khl.com"
objCDO.To = (rs_ealert.Fields.Item("LIST_ADV_CONTACT").Value)
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "KHL eAlert Workflow Reminder...advertising"
BodyString = Replace("advertising Lists are not complete yet","~",chr(13) & chr(10) )& chr(13)

objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send
Set objCDO = Nothing %>

<% else %>

<% Response.Write(" ") %>
<% end if %>


</td>
<td width="103" class="MainNormalText"align="center">
<% IF (rs_ealert.Fields.Item("DIGITALISSUE").Value) = "proof" Then%>
<img src="images/proof.gif">
<% ElseIf (rs_ealert.Fields.Item("DIGITALISSUE").Value) = "ready" Then %>
<img src="images/ready.gif">
<% ElseIf (rs_ealert.Fields.Item("DIGITALISSUE").Value) = "incomplete" Then %>
<img src="images/incomplete.gif">
<% End IF %>

<%
if strToday = strMyDate and (rs_ealert.Fields.Item("DIGITALISSUE").Value) <> "ready" then
%>
<%
FormFields = "to~body~subject"
If FormFields <> "" Then
arrFormFields = split(FormFields,"~")
End If
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = "eAlert@khl.com"
objCDO.To = (rs_ealert.Fields.Item("DIGITALISSUE_CONTACT").Value)
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "KHL eAlert Workflow Reminder...Digital Issue"
BodyString = Replace("Digital issue is not complete yet","~",chr(13) & chr(10) )& chr(13)

objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send
Set objCDO = Nothing %>

<% else %>

<% Response.Write(" ") %>
<% end if %>

</td>
<td width="80" class="MainNormalText"align="center">

<% IF (rs_ealert.Fields.Item("EDITORTEXT").Value) = "Yes" Then%>
<img src="images/thumbs_up.gif">
<% ElseIf (rs_ealert.Fields.Item("EDITORTEXT").Value) = "No" Then %>
<img src="images/thumbs_down.gif">
<% End IF %>

<%
if strToday = strMyDate and (rs_ealert.Fields.Item("EDITORTEXT").Value) = "No" then
%>
<%
FormFields = "to~body~subject"
If FormFields <> "" Then
arrFormFields = split(FormFields,"~")
End If
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = "eAlert@khl.com"
objCDO.To = (rs_ealert.Fields.Item("EDITORTEXT_CONTACT").Value)
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "KHL eAlert Workflow Reminder...Editorial"
BodyString = Replace("Editorial 'taster text' has not been sent to the IT dept.","~",chr(13) & chr(10) )& chr(13)

objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send
Set objCDO = Nothing %>

<% else %>

<% Response.Write(" ") %>
<% end if %>

</td>
<td valign="top" class="RightMargin"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_ealert.MoveNext()
Wend
%>

<tr>
<td height="20" colspan="8" valign="top" class="BottomMargin"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
</table>
<br>
<table width="200" border="0" cellpadding="5" align="center">
<tr>
<td><a href="admin/Dates.asp"><img src="images/button_katy_saara.gif" width="152" height="26" border="0" class="ButtonPadding"></a></td>
<td colspan="2"><a href="admin/List.asp"><img src="images/button_siob_souhir.gif" width="152" height="26" border="0" class="ButtonPadding"></a></td>
<td><a href="admin/DigitalIssue.asp"><img src="images/button_jamie_philippa.gif" width="152" height="26" border="0" class="ButtonPadding"></a></td>
</tr>
<tr>
<td colspan="2"><div align="right"><a href="admin/editor.asp"><img src="images/button_editorial.gif" width="152" height="26" border="0"></a></div></td>
<td colspan="2"><a href="admin/Sent.asp"><img src="images/button_it.gif" width="152" height="26" border="0"></a></td>
</tr>
</table>
<p align="center" class="InformationText">
</body>
</html>

<%
rs_ealert.Close()
Set rs_ealert = Nothing
%>

Thanks if you know!
 
One of your if statements have not been closed, you need to work through them methodically to find out which one

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top