Path: csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Martin Leese Newsgroups: comp.lang.javascript Subject: Re: the right "form" element for ajax Date: Tue, 06 Nov 2012 11:02:35 -0700 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <015e6c83-d721-441b-8e07-5393238fe005@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 6 Nov 2012 18:02:39 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="6ddb13786705f72253d65d0550f7ae10"; logging-data="28111"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19H89lAHx4Q4pZCmFmWFkao" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) In-Reply-To: <015e6c83-d721-441b-8e07-5393238fe005@googlegroups.com> Cancel-Lock: sha1:x1zG1hiWVUn6RqBJ8OkBWz/uWAc= Xref: csiph.com comp.lang.javascript:17053 amado.alves@gmail.com wrote: > A recurring issue I see but could not find a definitive answer. > > When we send user data via AJAX the attribute "action" of the HTML element "form" is useless and even looks like it can get in the way. Usually we call the send data function right from the "onclick" event of a "button" element, and use the getElement functions to fetch the user input. There's no "action" in the "form". Actually we don't even need the "form" element at all. But per the HTML reference the "form" element is required and its "action" attribute too (or isn't it?)
tags and AJAX are quite separate; each can occur without the other. > Some browsers accept "input" fields and "button" elements without being enclosed in any "form" element. And accept "form" elements without the "action" attribute. But, strictly, this is illegal, right? A