Path: csiph.com!aioe.org!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Interesting form functionality difference Date: Sun, 24 Jul 2016 18:40:26 +0200 Organization: PointedEars Software (PES) Lines: 49 Message-ID: <1689658.PYKUYFuaPT@PointedEars.de> References: <5aIhz.240$9n.232@fx38.iad> <87twfsr18i.fsf@bsb.me.uk> <2767618.5fSG56mABF@PointedEars.de> <2355525.mvXUDI8C0e@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1469378427 32356 eJwFwQkBwCAMA0BLdOkXORSIfwm7C6TlKc9ID4UMZY/k5sBUzdq9xoUMLQPvOKCPa6LPu/wBBl8Qiw== (24 Jul 2016 16:40:27 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 24 Jul 2016 16:40:27 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYEBwCAIA7CXhpZKz0GB/09Y4pvGd0AnfHxMIb3Kpyy7bZ3TiIZ29oqBSlzVed388H4lxbLN4IdB8Qd0DBW1 Cancel-Lock: sha1:fx0LAiZioQ1ltcExfoFLSdC/MHI= X-NNTP-Posting-Host: eJwNx8EBwCAIA8CVpCQpjANV9h/B3u/oMn0vRIHDqYYdVAtTyTo+axdaxSe1A+YLE3/Nd8jyAixqEPs= Xref: csiph.com comp.lang.javascript:30969 Robert Baer wrote: > Copy from page with form (which has 168 total lines): > >
> […] > > >
> > Added--------------vvvvvvvvvvvvvvvvvvvvvvvvvvv > mailHandlerURL:'http://www.oil4lessllc.com/bat/MailHandler.php', > Above from local ..js/forms.js; note added URL is not present for the > online website. > > In both cases, online website, or using local hard drive copy, when > 'Submit' button is clicked, the form data is sent. As posted, it is not a submit button, which is why this does not work without client-side scripting. Bad idea. However, the document tree can look different than the original markup. See e.g. the “Elements” tab in Chrome Dev Tools for the former. > That added info was required to make it work from the local hard drive. Then it is probably adding an “action” attribute to the form and calls the form’s submit() method. Because there is no indication that this site supports CORS, and without CORS you cannot do XHR across origins. (A cross- origin GET request without that would still be possible e.g. as JSONP, but that is not recommended here because of the browser’s URI length limit.) > BUT, like I said, the form is not cleared when working local. That is > why I saw 2-4 copies of the data in our e-mail inbox; I had clicked the > button exactly that many times. > Also I do not care about that difference or why. Why should I care about your problems then? And will you *please* trim your quotes to the *relevant* parts? -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.