Hi,
I have created a web page where a table from the SQL database is outputted onto the screen. I also created another page that allows the users to add or delete another row to the table. After providing the necessary links between these two pages, I check to see whether the second page functions properly. However, it shos an error stating:
Expected 'End'
/admin/sections/new/modify_activity_type.asp, line 90
Im not too sure what is meant by this, or maybe im misunderstanding something.
Can someone please clarify with me?...Thx
Here is the code :
"
function confirmDelete() {
}
function limitText(limitField, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
}
}
</script>
</head>
<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open = ConnectionString("IS")
id = Request.QueryString("id")
UPDATE = Request.QueryString("UPDATE")
If UPDATE = "ON" Then
SubmitButton = Request.QueryString("SubmitButton")
If SubmitButton = "Delete" Then
stmt = "DELETE From T_C_Activity_Types Where id = "& id
oConn.Execute(stmt)
Response.Write "Record Deleted"
Response.End
End If
if id <> "" Then
stmt = "SELECT * FROM T_C_Activity_Types ORDER BY ActivityType"
oRs = oConn.Execute(stmt)
tempID = Trim(oRs("id"))
tempActivityType = Trim(oRs("ActivityType"))
If oRs("id") = "1" Then
tempID = "Checked"
Else
tempID = ""
End If
If oRs("ActivityType") = "1" Then
tempActivityType = "Checked"
Else
tempActivityType = ""
End If
end if
stmt = "Select id, name from T_C_Activity_Types where id = 1"
Set oRs = oConn.Execute(stmt)
%>
<body style="margin:0px" onUnLoad="window.opener.location.reload()">
<form name="form1" action="modify_activity_type.asp" method="get">
<table style="width:100%">
<th colspan=3><input class="mainButton" type="submit" value="Submit" name="SubmitButton">
<input type="hidden" value="ON" name="UPDATE">
<%
If id <> "" Then
Response.Write "<input class=""mainButton"" type=""submit"" value=""Delete"" name=""SubmitButton"" onclick=""return confirm('Are you sure you want to delete this user?')"">"
End If
%>
<input type="hidden" value="<%= id %>" name="id"> // This is line 90!
I have created a web page where a table from the SQL database is outputted onto the screen. I also created another page that allows the users to add or delete another row to the table. After providing the necessary links between these two pages, I check to see whether the second page functions properly. However, it shos an error stating:
Expected 'End'
/admin/sections/new/modify_activity_type.asp, line 90
Im not too sure what is meant by this, or maybe im misunderstanding something.
Can someone please clarify with me?...Thx
Here is the code :
"
function confirmDelete() {
}
function limitText(limitField, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
}
}
</script>
</head>
<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open = ConnectionString("IS")
id = Request.QueryString("id")
UPDATE = Request.QueryString("UPDATE")
If UPDATE = "ON" Then
SubmitButton = Request.QueryString("SubmitButton")
If SubmitButton = "Delete" Then
stmt = "DELETE From T_C_Activity_Types Where id = "& id
oConn.Execute(stmt)
Response.Write "Record Deleted"
Response.End
End If
if id <> "" Then
stmt = "SELECT * FROM T_C_Activity_Types ORDER BY ActivityType"
oRs = oConn.Execute(stmt)
tempID = Trim(oRs("id"))
tempActivityType = Trim(oRs("ActivityType"))
If oRs("id") = "1" Then
tempID = "Checked"
Else
tempID = ""
End If
If oRs("ActivityType") = "1" Then
tempActivityType = "Checked"
Else
tempActivityType = ""
End If
end if
stmt = "Select id, name from T_C_Activity_Types where id = 1"
Set oRs = oConn.Execute(stmt)
%>
<body style="margin:0px" onUnLoad="window.opener.location.reload()">
<form name="form1" action="modify_activity_type.asp" method="get">
<table style="width:100%">
<th colspan=3><input class="mainButton" type="submit" value="Submit" name="SubmitButton">
<input type="hidden" value="ON" name="UPDATE">
<%
If id <> "" Then
Response.Write "<input class=""mainButton"" type=""submit"" value=""Delete"" name=""SubmitButton"" onclick=""return confirm('Are you sure you want to delete this user?')"">"
End If
%>
<input type="hidden" value="<%= id %>" name="id"> // This is line 90!