Solved

Cannot access Form object using JavaScript

Posted on 2007-12-02
3
165 Views
Last Modified: 2008-02-01
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");
            x.submit();
            
      }

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?
0
Comment
Question by:dirknibleck
3 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 250 total points
ID: 20392594
Change:
var x = document.getElementByID("update");
to:
var x = document.getElementById("update");

Javascript is case sensitive.
0
 
LVL 29

Assisted Solution

by:Göran Andersson
Göran Andersson earned 250 total points
ID: 20392597
Javascript is case sensetive.

Change getElementByID to getElementById.
0
 
LVL 15

Author Comment

by:dirknibleck
ID: 20392612
I officially feel blind as a bat.

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question