[ 7 posts ]

Philippe

  • Username: _philippe_
  • Joined: Thu Apr 02, 2009 2:58 am
  • Posts: 11
  • IRC: _philippe_
  • Offline
  • Profile

[YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Tue Dec 15, 2009 10:25 am
+0-
Hello,

When I submit a form with io-form with method POST, it works the first time, but if I submit my form twice, all the values are duplicated in the post request.

I wrote a minimal php / javascript code you can see at the address http://www.kitpages.fr/test/yui3/io.php

- When you click the first time on the submit button the alert is ok with the good parameter.
- The second time I submit the form, the parameter sent by the post request is sent twice (you can see it in firebug or the debugBar).
- The third time, the parameter is sent three times and so on.

I believe it is a bug in io or io-form, but I'm not sure. Can you check the code and tell me if I made a mistake.

Best regards,
Philippe
(I tested that with macos FF3 and IE8)

Thomas S. Sha

YUI Contributor

  • Username: tsha
  • Joined: Thu Jan 08, 2009 10:16 am
  • Posts: 206
  • Offline
  • Profile
Tags:

Re: [YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Tue Dec 15, 2009 10:38 am
+0-
The issue was reported and logged as ticket 2528307. It was resolved in build yui3-1557, specifically io-base.js. Please pull the build from development master from our project on GitHub for the resolution.

Regards,
Thomas

Philippe

  • Username: _philippe_
  • Joined: Thu Apr 02, 2009 2:58 am
  • Posts: 11
  • IRC: _philippe_
  • Offline
  • Profile
Tags:

Re: [YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Tue Dec 15, 2009 10:43 am
+0-
Thanks for your answer and the correction ! (I didn't find the good ticket, sorry...)

Green Wang

  • Username: Q.Wang
  • Joined: Sat Jan 16, 2010 6:30 pm
  • Posts: 44
  • Location: Beijing
  • Twitter: cocowool
  • GitHub: cocowool
  • Gists: cocowool
  • Offline
  • Profile

Re: [YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Sun Feb 28, 2010 12:17 am
+0-
i also met this problem
and i download the fix version of yui from github
but when i post form use Y.io
the request yet had been sent twice
anyone has a good idea?
YUI, Why not Use In your project?

Thomas S. Sha

YUI Contributor

  • Username: tsha
  • Joined: Thu Jan 08, 2009 10:16 am
  • Posts: 206
  • Offline
  • Profile
Tags:

Re: [YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Sun Feb 28, 2010 12:37 am
+0-
Please post a complete code example that reproduces this problem.

Regards,
Thomas

Green Wang

  • Username: Q.Wang
  • Joined: Sat Jan 16, 2010 6:30 pm
  • Posts: 44
  • Location: Beijing
  • Twitter: cocowool
  • GitHub: cocowool
  • Gists: cocowool
  • Offline
  • Profile
Tags:

Re: [YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Sun Feb 28, 2010 12:47 am
+0-
Code:
<?php
   if (validation_errors ()) {
      echo "<div id='errors'>";
      echo    validation_errors ();
      echo "</div>";
   }
?>
<div id='formcontent' class="">
<?php
   echo $form;
?>
</div>

<div id='jscontent' style='display:none;'>
YUI({combine:false, timeout:100000,base:'/system/application/js/yui/'}).use('io','node', function(Y){
   var d = document.getElementById('content');

   var Callback = {
      start:function(){},
      success:function(ioID, o){
         d.innerHTML = o.responseText;
      },
      failure:function(ioID, o){
         d.innerHTML = o.responseText;
      },
      end:function(ioID, o){
         Y.on('click', call, '#submitform', this);
      }
   };
   
   var cfg = {
      method:'POST',
      on:{
         start:Callback.start,
         success:Callback.success,
         failure:Callback.failure,
         end:Callback.end
      },
      content:Callback,
      form:{
         id:'newArticleCategory',
         useDisabled:true
      },
      headers:{'X-Transaction':'POST Example'}
   };
   
   function call(e){
      Y.io('/admin/newArticleCategory', cfg);
   };

   Y.on('click', call, '#submitform', this);
});   
</div>


just as above, the new article page was called by another Y.io
when i first submited this form, it run correctly
but when i want to add a new record, it posted twice
YUI, Why not Use In your project?

tejasbhojak

  • Username: tejasbhojak
  • Joined: Mon May 17, 2010 2:14 am
  • Posts: 21
  • IRC: Soul
  • Offline
  • Profile
Tags:

Re: [YUI3.0.0, io-form] duplicate values with io-form ?

Post Posted: Sun May 06, 2012 9:50 pm
+0-
i am on YUI 3.4.1
if found this ticket http://yuilibrary.com/projects/yui3/ticket/2528307

ticket says target release as 3.1.0

when i submit form the radio button type fields gets duplicated.
one field has proper value other gets undefined.

i guess this issue is not completely fixed.
  [ 7 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum