Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Dec 2010
    Posts
    7
    Vote Rating
    0
    juerg is on a distinguished road

      0  

    Default submit form in background

    submit form in background


    I probably missed something. I expected that POSTing some form in the background to the server would be a snap with one of world's leading Javascript frameworks. But it wasn't.

    The expected easy solution was:

    1) create a form, set values
    2) submit it

    The only solution that finally (after hours) worked (with version 3.2.1):

    1) create a FormPanel, set values
    2) render() it
    3) hide() it immediately after rendering
    4) Ajax.request it (required as server would not answer with {success: true} (see also http://www.sencha.com/learn/Manual:RESTful_Web_Services))

    Without the rendering step, the form is transmitted, but without fields. Yes, I know, FormPanel and its containing BasicForm are only abstractions. Still, as the form should not be visible to users, there should be an easy and low overhead way (i.e. without rendition step) to achieve this (IMO common) task.

    Any suggestions for better patterns?

    Thanks,
    Juerg

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    81
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Why do steps 1-3? Step 4 is enough (don't forget to specify the params).

    ps. And if you ever consider actually submitting a form then you can use an errorReader if your server doesn't respond with {success:true}.

  3. #3
    Ext User
    Join Date
    Dec 2010
    Posts
    7
    Vote Rating
    0
    juerg is on a distinguished road

      0  

    Default


    Condor, of course, you are so d'mn right! Thanks.

    Not so sure about the errorReader approach. It's an interesting workaround, but certainly would prefer the problem solved at root, i.e. that HTTP status group 200 would be accepted as success by default.

Similar Threads

  1. form.submit is not a function [Break on this error] form.submit();
    By intro in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 30 Aug 2010, 11:03 AM
  2. form.submit doesn't call url in form submit action
    By webwolfi in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 26 Apr 2009, 10:16 AM
  3. Replies: 2
    Last Post: 12 Apr 2009, 5:52 PM
  4. Form without submit button, handling submit with shift+enter...
    By violinista in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jun 2007, 12:02 AM

Thread Participants: 1

Tags for this Thread