Re: Multiple Form Post Using Javascript - Empty Post from FF
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Wed, 23 Nov 2005 00:48:04 +0100
Adam wrote:
> I tried out both your suggestions but still no luck! Firefox still
> sends empty posts for only the "add card" form on the page. It says
> that document.getElementByID is not a function.. (I tried different
> capitalisations of the function name just in case)
You did not try `document.getElementById'. And
<input type="image" ...
onclick="javascript:document.getElementbyId('infoform').submit();"/>
is nonsense.
1. `javascript:' is nonsensical where supported as designed
(to generate an HTML document from script code; the submit()
method returns `undefined') and error-prone when not supported.
Omit that and add
<meta http-equiv="Content-Script-Type" content="text/javascript" />
to the `head' element.
2. The `input' element is descendant of the `form' element referred to.
If it were not already a submit control, that form element could be
easily referred to by `this.form'. No need for getElementById()
and the like.
3. input[type="image"] are submit controls, there is no need for scripting.
4. <http://hixie.ch/advocacy/xhtml>
HTH
PointedEars
.
- Follow-Ups:
- References:
- Prev by Date: Re: Generic innerHTML functionality and other minor questions...
- Next by Date: Re: Launching a URL from a batch file
- Previous by thread: Re: Multiple Form Post Using Javascript - Empty Post from FF
- Next by thread: Re: Multiple Form Post Using Javascript - Empty Post from FF
- Index(es):
Relevant Pages
|
Loading