473,320 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

error console says document.forms[0].submit not a function

As per the subject line,
Firefox's error console says document.forms[0].submit is not a
function.
the javascript is

function makequery(param){
document.forms[0].qu.value=param;
document.forms[0].submit();
}

called by clicking on a link with a javascript url.

the value of qu gets changed correctly.
this same thing happens if I use the name of the form, which is main.

document.main.submit() is not a function.

May 21 '07 #1
2 10846
Lee
pantagruel said:
>
As per the subject line,
Firefox's error console says document.forms[0].submit is not a
function.
the javascript is

function makequery(param){
document.forms[0].qu.value=param;
document.forms[0].submit();
}
The error is in your HTML.
You've named something "submit", haven't you?
If you name a control "submit", then document.forms[0].submit
refers to that control, not the function.
Change the name.
--

May 21 '07 #2
On May 21, 5:01 pm, Lee <REM0VElbspamt...@cox.netwrote:
pantagruel said:
As per the subject line,
Firefox's error console says document.forms[0].submit is not a
function.
the javascript is
function makequery(param){
document.forms[0].qu.value=param;
document.forms[0].submit();
}

The error is in your HTML.
You've named something "submit", haven't you?
If you name a control "submit", then document.forms[0].submit
refers to that control, not the function.
Change the name.

--

hmm thanks, I think that's right. The page I'm working on is generated
from somewhere else and I'm adding to it via a proxy but I think the
button doing the submitting is named submit.


May 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: news.onetel.net.uk | last post by:
I and my friend Karl have spent literally all day trying to find out what is causing my error but we are zapped of any further functionality :) I have a form that adds news records. You select...
15
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange)...
3
by: Frances Del Rio | last post by:
for screen shot pls see http://www.francesdelrio.com/error.gif when viewing in netscape JS console it says 'document.phrase has no properties', which is very weird.. 'document.phrase' refers to...
8
by: shandain | last post by:
Ok, I have done this a million times, and I can't get this to work... I hope I am just being an idiot and missing something... but I can't see it... so please call me an idiot and tell me what it...
7
by: michael | last post by:
apologies in advance, as not only am i new to learning how to code javascript properly, i'm new to the groups posting thing... i am developing in firefox 1.0+, but will be working in an msie 6.0+...
5
by: DaFallus | last post by:
I'm trying to write a somewhat simple page with dependent drop-down boxes. Unfortunately the entire page is written through PL/SQL so that makes it even more difficult for me to trouble shoot. I...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
5
by: Nathan Sokalski | last post by:
I have an ASP.NET application which is giving the following JavaScript error: 'theForm' is undefined However, when I do a View Source one of the <scriptelements is as follows: <script...
2
by: bips2008 | last post by:
The code seems to work fine in other browser but in IE it throws this error. This is very urgent for me and any help would be greatly appreciated For your convienence i have posted the code for the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.