Re: Multiple Form Post Using Javascript - Empty Post from FF



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
.



Relevant Pages

  • Re: Multiple Form Post Using Javascript - Empty Post from FF
    ... I tried out both your suggestions but still no luck! ... Firefox still ... sends empty posts for only the "add card" form on the page. ...
    (comp.lang.javascript)
  • Re: Zen and...Math??
    ... contradiction. ... The same thing happens with the famous card trick, with one side of the card ... To me it is nonsense, since it leads to a contradiction either way. ...
    (sci.math)
  • Re: Where is whats new setup?
    ... it jerks me off to this web page: ... Anyone know where this first time run nonsense is setup? ... I think the correct parameter is startup.homepage_override_url ... before starting firefox :-). ...
    (Fedora)
  • Re: Weekend excursion to the UK
    ... German ones are. ... carry that card for verification purposes. ... I don't see why you think it nonsense. ... Print at home tickets must be ...
    (uk.railway)
  • Re: Where is whats new setup?
    ... Anyone know where this first time run nonsense is setup? ... before starting firefox :-). ...
    (Fedora)

Loading