I am getting this error.
Line: 30
Char: 1
Error: 'options' is null or not an object
Code: 0
Here is my code.
In the Header I have the follow:
<script language="javascript">
function gotoMonth()
{
var theMonthList = document.forms[0].cboMonth;
var theYearList = document.forms[0].cboYear;
var theMonth = theMonthList.options[theMonthList.selectedIndex].value;
var theYear = theYearList.options[theYearList.selectedIndex].value;
theLocation = "index.cfm?fuseaction=ViewGoToMonth&GoToYear=" + theYear + "&GoToMonth=" + theMonth;
window.open(theLocation, "_top", "")
}
</script>
Here is the Form code that is located in the body.
<form>
<b><font size="2">Go To: </font></b>
<select name="cboMonth" onmouseover="self.status='Select Month';return true" onmouseout="self.status='';return true">
<cfset MonthNum = 0>
<cfloop index="MonthIndex" list="#Session.MonthList#">
<cfoutput>
<cfif #MonthIndex# EQ #DateMonthStr#>
<cfset MonthNum = #MonthNum# + 1>
<option value="#MonthNum#" selected>#MonthIndex#</option>
<cfelse>
<cfset MonthNum = #MonthNum# + 1>
<option value="#MonthNum#">#MonthIndex#</option>
</cfif>
</cfoutput>
</cfloop>
</select>
<select name="cboYear" onmouseover="self.status='Select Year';return true" onmouseout="self.status='';return true">
<cfloop index="YearIndex" from="#Year10Past#" to="#Year10Fut#" step="1">
<cfoutput>
<cfif #YearIndex# EQ #DateYear#>
<option value="#YearIndex#" selected>#YearIndex#</option>
<cfelse>
<option value="#YearIndex#">#YearIndex#</option>
</cfif>
</cfoutput>
</cfloop>
</select>
<input type="button" value=" Go " onClick="JavaScript:gotoMonth()" onMouseOver="self.status='Go';return true" onMouseOut="self.status='';return true">
</form>
And the URL where the Code is being used it here:
Problem is the with GO TO: Combo Boxes and the Go Button.
Thanks in advanced for any help!
GRFX69
Line: 30
Char: 1
Error: 'options' is null or not an object
Code: 0
Here is my code.
In the Header I have the follow:
<script language="javascript">
function gotoMonth()
{
var theMonthList = document.forms[0].cboMonth;
var theYearList = document.forms[0].cboYear;
var theMonth = theMonthList.options[theMonthList.selectedIndex].value;
var theYear = theYearList.options[theYearList.selectedIndex].value;
theLocation = "index.cfm?fuseaction=ViewGoToMonth&GoToYear=" + theYear + "&GoToMonth=" + theMonth;
window.open(theLocation, "_top", "")
}
</script>
Here is the Form code that is located in the body.
<form>
<b><font size="2">Go To: </font></b>
<select name="cboMonth" onmouseover="self.status='Select Month';return true" onmouseout="self.status='';return true">
<cfset MonthNum = 0>
<cfloop index="MonthIndex" list="#Session.MonthList#">
<cfoutput>
<cfif #MonthIndex# EQ #DateMonthStr#>
<cfset MonthNum = #MonthNum# + 1>
<option value="#MonthNum#" selected>#MonthIndex#</option>
<cfelse>
<cfset MonthNum = #MonthNum# + 1>
<option value="#MonthNum#">#MonthIndex#</option>
</cfif>
</cfoutput>
</cfloop>
</select>
<select name="cboYear" onmouseover="self.status='Select Year';return true" onmouseout="self.status='';return true">
<cfloop index="YearIndex" from="#Year10Past#" to="#Year10Fut#" step="1">
<cfoutput>
<cfif #YearIndex# EQ #DateYear#>
<option value="#YearIndex#" selected>#YearIndex#</option>
<cfelse>
<option value="#YearIndex#">#YearIndex#</option>
</cfif>
</cfoutput>
</cfloop>
</select>
<input type="button" value=" Go " onClick="JavaScript:gotoMonth()" onMouseOver="self.status='Go';return true" onMouseOut="self.status='';return true">
</form>
And the URL where the Code is being used it here:
Problem is the with GO TO: Combo Boxes and the Go Button.
Thanks in advanced for any help!
GRFX69