So I have the error mentioned in the title when I try to build my web site through the file menu. The code that causes this is below (JavaScript that appears in the body tag):
if(editedRow != null)
{
var SundayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_SunLocale.ClientID %>");
var MondayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_MonLocale.ClientID %>");
var TuesdayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_TuesLocale.ClientID %>");
var WednesdayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_WedLocale.ClientID %>");
var ThursdayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_ThursLocale.ClientID %>");
var FridayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_FriLocale.ClientID %>");
var SaturdayLoc = $find("<%= FieldOpsScheduler_ctl00_ctl05_RCB_SatLocale.ClientID %>");
if(currentCombo == "OFF" || currentCombo == "OFFICE")
{
if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_SunActivity")
{
SundayLoc.disable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_MonActivity")
{
MondayLoc.disable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_TuesActivity")
{
TuesdayLoc.disable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_WedActivity")
{
WednesdayLoc.disable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_ThursActivity")
{
ThursdayLoc.disable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_FriActivity")
{
FridayLoc.disable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_SatActivity")
{
SaturdayLoc.disable();
}
sender.hideDropDown();
}
else if(currentCombo != "OFF" && currentCombo != "OFFICE")
{
if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_SunActivity")
{
SundayLoc.enable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_MonActivity")
{
MondayLoc.enable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_TuesActivity")
{
TuesdayLoc.enable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_WedActivity")
{
WednesdayLoc.enable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_ThursActivity")
{
ThursdayLoc.enable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_FriActivity")
{
FridayLoc.enable();
}
else if(rcbID == "FieldOpsScheduler_ctl00_ctl05_RCB_SatActivity")
{
SaturdayLoc.enable();
}
sender.hideDropDown();
}
}
Now what's really weird (and perhaps is an underlying cause of this occurring) is that when I delete the above code, exactly half the errors pointing out those web form element ID names go away. However only half -- not all of them, which doesn't make sense seeing as I got rid of all parts of the JavaScript code that ask for the web form elements' IDs.
After deleting all relevant JavaScript and double-clicking the remaining seven error messages in VS2005, they all take me to the very first line of code in the page, which is this:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DistrictSchedule.aspx.vb" Inherits="FieldOperations_DistrictSchedule" %>
Myself nor my coworker knows what the deuce is going on. When I get rid of half of the errors, at least the page will execute. However it all SHOULD work, judging by the code..
Additional Error Info: I should mention that those web form element IDs that I'm trying to find exist ONLY when my RadGrid is in edit mode, so it would make sense that they're not originally there to begin with. Regardless, this should NOT be causing a site-crippling error, although for whatever reason it is. Lastly, the specific lines throwing the error are the ones utilizing $find, and the lines utilizing the vars that $find gets values for throw the error too.
Whoever out there who can tell me what is going on would be a MAJOR help. I thank you in advance.