Cannot access Form object using JavaScript

I have some pretty basic code here to submit a form (I plan to have it change some items first, but until I can get the submit working - what's the point?)

The code is:

function reschedGame(){
            var x = document.getElementByID("update");

Where update is, in fact, the id of the form. The name of the form is also update.

If I try something like:

function reschedGame(){
            alert("Hey this works!");

The function fires on click.

Any thoughts?
LVL 15
Who is Participating?
hieloConnect With a Mentor Commented:
var x = document.getElementByID("update");
var x = document.getElementById("update");

Javascript is case sensitive.
Göran AnderssonConnect With a Mentor Commented:
Javascript is case sensetive.

Change getElementByID to getElementById.
dirknibleckAuthor Commented:
I officially feel blind as a bat.

Solutions delivered at exactly the same time (or near enough) so I split it. Thanks!
All Courses

From novice to tech pro — start learning today.