Forums
This topic is locked
pure asp upload problems
Posted 24 Feb 2003 23:13:54
1
has voted
24 Feb 2003 23:13:54 Panama Evans posted:
I have made a page that works great till add the pure asp upload feature. When I try to upload the file I get an error message " Microsoft VBScript runtime error '800a0005' Invalid procedure call or argument: 'MonthName'
/calender/admin/add2a.asp, line 158"
Just incase I have uploade the two pages in question.
<!--#include file="dsn.asp"-->
<!--#include file="body.asp"-->
<html>
<head>
<title>Calendar</title>
<!--#include file="style.asp"-->
<style type="text/css">
<!--
@import url("../css/bodytext.css"
-->
</style>
</head>
<%
navmonth = request.querystring("month"
navyear = request.querystring("year"
If navmonth = "" Then
navmonth = Month(Date)
End If
If navyear = "" Then
navyear = Year(Date)
End If
firstday = Weekday(CDate(navmonth & "/" & 1 & "/" & navyear))
leapTestNumbers = navyear / 4
leapTest = (leapTestNumbers) - Round(leapTestNumbers)
If navmonth = 2 Then
If leapTest <> 0 Then
lastDate = 28
Else
lastDate = 29
End If
ElseIf ((navmonth = 4) OR (navmonth = 6) OR (navmonth = 9) OR (navmonth = 11)) Then
lastDate = 30
Else
lastDate = 31
End If
lastMonth = navmonth - 1
lastYear = navyear
If lastMonth < 1 Then
lastMonth = 12
lastYear = lastYear - 1
End If
nextMonth = navmonth + 1
nextYear = navyear
If nextMonth >12 Then
nextMonth = 1
nextYear = nextYear + 1
End If
%>
<table width="610" height="352" border="5" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="634" height="112">
<table border="0" cellpadding="2" cellspacing="0" width="604">
<!--DWLayoutTable-->
<tr>
<td height="54" colspan="4" align="left" valign="bottom"> <p><font face="verdana" size="4"><b><img src="../ACRN_banner2.gif" width="600" height="50" align="top"></b></font></p></td>
<td width="1"></td>
</tr>
<tr>
<td width="131" height="44" align="left" valign="bottom"><font face="verdana" size="2"><b><a href="defaultb.asp?month=<%=lastMonth%>&year=<%=lastYear%>"><</a></b></font><font face="verdana" size="2"><b><a href="defaultb.asp?month=<%=lastMonth%>&year=<%=lastYear%>">
<%If (RSBODY("Abbreviate_Months" = True) Then%>
<%=MonthName(lastMonth, true)%>
<%Else%>
<%=MonthName(lastMonth)%>
<%End If%>
</a></b></font></td>
<td width="345" align="center" valign="bottom"><font face="verdana" size="4"><b>
<%If (RSBODY("Abbreviate_Months" = True) Then%>
<%=MonthName(navMonth, true)%>
<%Else%>
<%=MonthName(navMonth)%>
<%End If%>
<%=navyear%></b></font></td>
<td width="119" align="center" valign="bottom"> <div align="right"><font face="verdana" size="2"><b><a href="defaultb.asp?month=<%=nextMonth%>&year=<%=nextYear%>">
<%If (RSBODY("Abbreviate_Months" = True) Then%>
<%=MonthName(nextMonth, true)%>
<%Else%>
<%=MonthName(nextMonth)%>
<%End If%>
> </a></b></font></div></td>
<td width="1"> </td>
<td></td>
</tr>
<tr>
<td height="18" colspan="5" valign="top" bgcolor="#CCCCCC">
<div align="center" class="bodytext"><strong><em>All
times are in Central Standard time.</em></strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="191" valign="top"> <table width="100%" height="191" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="191"">
<div align="center"></div>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
</font></a></p></td>
</tr>
<% Do while dateCounter <= lastDate %>
<tr>
<% Do while weekCount <= 1
dateSelect = navmonth & "/" & dateCounter & "/" & navyear %>
<% If dateCounter > lastDate Then %>
</td>
<% else %>
<td valign="top" bgcolor=""><font color="#999999"><a href="datea.asp?date=<%=dateSelect%>"> </a herf>
<%
Set RSEVENT = Server.CreateObject("ADODB.RecordSet"
RSEVENT.Open "SELECT * FROM Events", Conn, 1, 3
Do while NOT RSEVENT.EOF
rsdate = RSEVENT("Date"
%>
<!--This shows the monthName,Location, and Category. still need to add numeric dates after month-->
<%If (Day(rsdate) = dateCounter) AND (Month(rsdate) = CInt(navmonth)) AND (Year(rsdate) = CInt(navyear)) Then%>
<br>
<font color=0000FF><font face="verdana" size="2"><B>
<%=MonthName(RSEVENT("Month1" )%> <%=RSEVENT("Date_Day1"%> <%=RSEVENT("Date_Day2"%> <%=RSEVENT("Date_Day3"%><BR>
<%=RSEVENT("Event_Name"%><BR>
<%=RSEVENT("Location"%><BR>
<%=RSEVENT("Category"%><BR></B>
<i><a href="datea.asp?date=<%=dateSelect%>">Click Here for more information.</a herf></font></i><BR><BR>
<table width="100%" border="0" cellpadding="0" cellspacing="0" dwtype="TableCell">
<!--DWLayoutTable, seperation of dates-->
<tr>
<td height="18" colspan="0" valign="top" bgcolor="#CCCCCC">
</td>
</table>
<% End If
RSEVENT.movenext
Loop
RSEVENT.close
%>
</font></a></font></td>
<%
dateCounter = dateCounter + 1
end if
weekCount = weekCount + 1
Loop
weekCount = 1
%>
</tr>
<% Loop %>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="39" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="707" height="19" valign="top"><table width="102%" height="55" border="0" bgcolor="#CCCCCC">
<tr>
<td width="13%" height="51">
<div align="center"><a href="../default.htm" class="CalendarLinks"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Home</font></strong></a></div></td>
<td width="13%"> <div align="center"><a href="../partners.htm" class="CalendarLinks"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Partners</font></strong></a></div></td>
<td width="13%"> <div align="center"><a href="../training_info.htm" class="CalendarLinks"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Training</font></strong></a></div></td>
<td width="15%"> <div align="center"><a href="../acrn_network.asp" class="CalendarLinks"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Network</strong></font></a></div></td>
<td width="15%"> <div align="center"><a href="../resources.htm" class="CalendarLinks"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Resources</font></strong></a></div></td>
<td width="15%"> <div align="center"><a href="www.acrnetwork.org/contact.htm" class="CalendarLinks"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Contact
Us</strong></font></a></div></td>
<td width="15%"> <div align="center"><a href="../acrn_clearinghouse.asp" class="CalendarLinks"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Search</font></strong></a></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<!--#include file="dsn2.asp"-->
<!--#include file="dsn.asp"-->
<!--#include file="body.asp"-->
<%
If IsDate(request("Date_Month" + "/" + request("Date_Day" + "/" + request("Date_Year") Then
Set RSEVENTS = Server.CreateObject("ADODB.Recordset"
RSEVENTS.Open "Events", Conn, 2, 2
RSEVENTS.addnew
RSEVENTS("Event_Name" = request("Event_Name"
RSEVENTS("Description" = request("Description"
RSEVENTS("Time_Start" = request("Time_Start"
RSEVENTS("Category" = request("Category"
RSEVENTS("Time_Start_AMPM" = request("Time_Start_AMPM"
RSEVENTS("Time_End_AMPM" = request("Time_End_AMPM"
RSEVENTS("Time_End" = request("Time_End"
RSEVENTS("Date_Day2" = request("Date_Day2"
RSEVENTS("Time_Start2" = request("Time_Start2"
RSEVENTS("Time_Start_AMPM_2" = request("Time_Start_AMPM_2"
RSEVENTS("Time_End2" = request("Time_End2"
RSEVENTS("Time_End_AMPM_2" = request("Time_End_AMPM_2"
RSEVENTS("Date_Day3" = request("Date_Day3"
RSEVENTS("Time_Start3" = request("Time_Start3"
RSEVENTS("Time_Start_AMPM_3" = request("Time_Start_AMPM_3"
RSEVENTS("Time_End3" = request("Time_End3"
RSEVENTS("Time_End_AMPM_3" = request("Time_End_AMPM_3"
eventDate = request("Date_Month" + "/" + request("Date_Day" + "/" + request("Date_Year"
RSEVENTS("Date" = eventDate
If (request("Location" = "" Then
RSEVENTS("Location" = Null
Else
RSEVENTS("Location" = request("Location"
End If
If (request("Email" = "" Then
RSEVENTS("Email" = Null
Else
RSEVENTS("Email" = request("Email"
End If
If (request("URL" = "" Then
RSEVENTS("URL" = Null
Else
RSEVENTS("URL" = request("URL"
End If
RSEVENTS.update
RSEVENTS.close
set RSEVENTS = nothing
End If
%>
<html>
<head>
<title>Event added</title>
<script language="javascriptfunction mmLoadMenus() {
if (window.undefined) return;
window.mm_menu_1015164512_2 = new Menu("root",217,18,"Verdana, Arial, Helvetica, sans-serif",12,"#000000","#ffffff","#cccccc","#000084","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_1015164512_2.addMenuItem("Administrator Resources","location='www.acrnetwork.org/user_login.asp'"ACRN Clearinghouse"ACRN Web Board"Federal Government Publications"Product Catalog"Research Items"Communication Resources"Career Information Systems"International Resources"Links"
mm_menu_1015164512_2.hideOnMouseOut=true;
mm_menu_1015164512_2.menuBorder=1;
mm_menu_1015164512_2.menuLiteBgColor='#ffffff';
mm_menu_1015164512_2.menuBorderBgColor='#555555'
mm_menu_1015164512_2.bgColor='#555555'
mm_menu_1015164512_2.writeMenus();
} // mmLoadMenus()added></title>
{
} open_Settings_List_Name()
popupWin = window.open('help.asp?ID=Settings_List_Name', 'remote', ',','width=300,height=200') open_Settings_Admin_ID() open_Settings_Admin_Email() open_Settings_From_Email() open_Settings_URL_Dir() open_Settings_URL_Home() open_Settings_Message_Welcome() open_Settings_Message_Goodbye() open_Settings_Password() open_Settings_Notify_Join() open_Settings_Notify_Quit() VerifyData() ((document.frmUser.Component.value == "ASPEmail" &&
(document.frmUser.SMTP.value ==
alert("You must enter a Mail Server are using the Component have selected"
return false; (document.frmUser.Admin_Pass.value != document.frmUser.Admin_Pass2.value)"Passwords do not Match. else (document.frmUser.List_Name.value == mailinglist name. (document.frmUser.Admin_ID.value == an Admin ID. (document.frmUser.Admin_Email.value == Email. (document.frmUser.From_Email.value == (document.frmUser.URL_Dir.value == URL of Directory in which this program is installed. (document.frmUser.URL_Home.value == your Homepage. Password. true;
></script>
<script language="javascript">
function open_Event_Name() {
popupWin = window.open('help.asp?ID=Event_Name', 'remote', 'width=300,height=200')
}
function open_Event_Date() {
popupWin = window.open('help.asp?ID=Event_Date', 'remote', 'width=300,height=200')
}
function open_Event_Time() {
popupWin = window.open('help.asp?ID=Event_Time', 'remote', 'width=300,height=200')
}
function open_Event_Category() {
popupWin = window.open('help.asp?ID=Event_Category', 'remote', 'width=300,height=200')
}
function open_Event_Location() {
popupWin = window.open('help.asp?ID=Event_Location', 'remote', 'width=300,height=200')
}
function open_Event_Description() {
popupWin = window.open('help.asp?ID=Event_Description', 'remote', 'width=300,height=200')
}
function open_Event_Email() {
popupWin = window.open('help.asp?ID=Event_Email', 'remote', 'width=300,height=200')
}
function VerifyData() {
if (document.frmUser.Event_Name.value == "" {
alert("You must enter an Event Name."
return false;
} else if (document.frmUser.Category.value == "" {
alert("You must select a category."
return false;
} else if ((document.frmUser.Date_Month.value == "Blank" ||
(document.frmUser.Date_Day.value == "Blank" ||
(document.frmUser.Date_Year.value == "Blank" ||
(document.frmUser.Time_Hour.value == "Blank" ||
(document.frmUser.Time_Minute.value == "Blank" ||
(document.frmUser.Time_AMPM.value == "Blank") {
alert("You must complete the Date and Time fields."
return false;
} else
return true;
}
</script>
<!--#include file="style.asp"-->
</head>
<body bgcolor="#F0F0F0" vlink="#48576C" link="#48576C" alink="#000000">
<table border="0" cellpadding="0" cellspacing="0" width="650" align="center">
<!--DWLayoutTable-->
<tr>
<td height="1" colspan="5" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
</tr>
<tr>
<td width="1" height="50" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
<td colspan="3" valign="top"><img src="../../acrn_banner2.gif" width="648" height="50"></td>
<td width="1" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
</tr>
<tr>
<td height="1" colspan="5" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
</tr>
<tr>
<td rowspan="3" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
<td width="130" height="19"></td>
<td width="1" rowspan="3" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
<td width="517"><%= Session("username" %></td>
<td rowspan="3" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
</tr>
<tr>
<td height="3"></td>
<td></td>
</tr>
<tr>
<td height="262"></td>
<td valign="top"><table border="0" cellpadding="2" cellspacing="0" width="517">
<tr>
<td width="100%"><font face="Verdana" size="1">
<%If IsDate(request("Date_Month" + "/" + request("Date_Day" + "/" + request("Date_Year") Then%>
The event has been added.<br>
<br>
<a href="../../welcome.asp"><< <b>Return</b></a>
<%Else%>
<%=MonthName(request("Date_Month")%> <%=request("Date_Day"%>, <%=request("Date_Year"%> is not a valid date.<br>
<br>
<br>
<a href="add.asp"><< <b>Try Again</b></a>
<%End If%>
</font></td>
</tr>
</table></td>
</tr>
<tr>
<td height="1" colspan="5" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
</tr>
<tr>
<td height="30" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
<td> </td>
<td> </td>
<td> </td>
<td bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
</tr>
<tr>
<td height="1" colspan="2" bgcolor="#000000"><img src="../im/clear.gif" height="1" width="1"></td>
<td bgcolor="#000000"></td>
<td bgcolor="#000000"></td>
<td bgcolor="#000000"></td>
</tr>
</table>
</body>
</html>
<!--#include file="dsn2.asp"-->
Thanks for your help.
Replies
Replied 25 Feb 2003 09:52:28
25 Feb 2003 09:52:28 Martha Graham replied: