Solved

Cannot access Form object using JavaScript

Posted on 2007-12-02
3
168 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
Suggested Courses

622 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