Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18777

Re: How to submit a form with two actions?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="UTF-8"
Message-ID <1572630.hS600URIVS@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Organization PointedEars Software (PES)
Date Fri, 08 Mar 2013 20:50:24 +0100
User-Agent KNode/4.8.5
Content-Transfer-Encoding 8Bit
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Subject Re: How to submit a form with two actions?
Newsgroups comp.lang.javascript
References <d7794c16-2790-4efb-b512-fba93780e624@googlegroups.com>
MIME-Version 1.0
Lines 38
NNTP-Posting-Date 08 Mar 2013 20:50:50 CET
NNTP-Posting-Host 806a6545.newsspool2.arcor-online.net
X-Trace DXC=gVb1oPbdi[SU6b:FjPaGjQA9EHlD;3YcR4Fo<]lROoRQ8kF<OcfhCO[9oB1OC=45T\DZm8W4\YJN\b@mF9jNikdUBoKGPB=12AWd22UPGPO@5Y
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.javascript:18777

Show key headers only | View raw


justaguy wrote:

> Is it possible

Is what possible?

> If so, the following script does not work,

“Does not work” is not a problem description.  Read the FAQ.

> what's wrong? 
> 
> <script type="text/javascript">
> 
> function doubleSubmit(f)
> {
> // submit to action in form
> f.submit();
> // return false;
> 
> // set second action and submit
> // f.target="_blank";
> f.action="action2.html";
> f.submit();
> // return false;
> }

If you submit a form so that the result is displayed in the same view 
(window, frame etc.), the document containing the source code is unloaded 
(the same as if you navigate away).  In short, code in that document that is 
located after the call during execution is not necessarily available 
anymore.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 13:18 -0800
  Re: How to submit a form with two actions? Danny <dann90038@gmail.com> - 2013-03-07 14:40 -0800
    Re: How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 14:46 -0800
      Re: How to submit a form with two actions? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-03-07 15:31 -0800
        Re: How to submit a form with two actions? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-03-08 00:42 +0100
          Re: How to submit a form with two actions? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-03-07 15:55 -0800
            Re: How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 16:43 -0800
              Re: How to submit a form with two actions? Stefan Weiss <krewecherl@gmail.com> - 2013-03-08 02:55 +0100
                Re: How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 18:09 -0800
                Re: How to submit a form with two actions? Stefan Weiss <krewecherl@gmail.com> - 2013-03-08 04:21 +0100
                Re: How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 19:37 -0800
                Re: How to submit a form with two actions? Stefan Weiss <krewecherl@gmail.com> - 2013-03-08 13:18 +0100
    Re: How to submit a form with two actions? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-08 20:51 +0100
  Re: How to submit a form with two actions? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-03-07 23:52 +0100
  Re: How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 15:16 -0800
    Re: How to submit a form with two actions? Danny <dann90038@gmail.com> - 2013-03-07 15:22 -0800
    Re: How to submit a form with two actions? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-03-08 00:37 +0100
      Re: How to submit a form with two actions? justaguy <lichunshen84@gmail.com> - 2013-03-07 16:44 -0800
    Re: How to submit a form with two actions? Denis McMahon <denismfmcmahon@gmail.com> - 2013-03-09 05:09 +0000
  Re: How to submit a form with two actions? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-08 20:50 +0100

csiph-web