Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

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.

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.

--

On May 21, 5:01 pm, Lee <REM0VElbspamt@cox.net> wrote:

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.
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc