1. #131
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @frederickd, I think your issue is a PHP one, not a JavaScript one - what gets sent back to the server is an array of selected items. When using PHP, you must append square brackets to the end of the form field name. This is the same as when posting any data to a PHP backend.

    Try naming your field data[repairorder][services][]

    Note the additional square brackets!

    Regards, Dan

  2. #132
    Ext User
    Join Date
    Aug 2009
    Location
    Semi-retired in Mexico
    Posts
    47
    Vote Rating
    0
    frederickd is on a distinguished road

      0  

    Default


    @danh2000

    Thanks for the tip. Gotta love square brackets. In this case it didn't work for me. I added the trailing [] to the hiddenName field and the existing value in the field did not display nor would the new values save.

    When I manually edit the record using an SQL tool to put comma-delimited values in, the display shows the selections (yeah!) but saves only the last one in the list.

    I will see if I can assemble the array on the PHP side. The POST is obviously sending the elements. Hmmm...

  3. #133
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @frederickd, I'm travelling in Europe at the moment and am limited to my iPhone. I'll take another look in a few days when I'm back at home and will see if I can help further - please bear with me.

    Thanks,

    Dan

  4. #134
    Ext JS Premium Member
    Join Date
    May 2008
    Location
    Austria, Vienna
    Posts
    209
    Vote Rating
    1
    abraxxa is on a distinguished road

      0  

    Default


    Quote Originally Posted by abraxxa View Post
    This is a patch that prevents a store from loading if a valuesQuery without a value is requested:

    change line 1394 to:
    Code:
    if(forceAll === true || (q.length >= this.minChars) || (valuesQuery === true && q )){
    I stumbled over this bug again in the current version, now it's in line 1423.
    Without the patch a valuesquery isn't performed when the value is shorter than the minChars property.

  5. #135
    Ext User
    Join Date
    Aug 2009
    Location
    Semi-retired in Mexico
    Posts
    47
    Vote Rating
    0
    frederickd is on a distinguished road

      0  

    Default


    @danh2000

    Thank you for taking a look at this. I hope you had a safe return.

  6. #136
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by frederickd View Post
    @danh2000

    Thank you for taking a look at this. I hope you had a safe return.
    I did thanks.

    I've just performed some testing and the values are submitted correctly, you therefore have a problem with your PHP code.

    As I said, an array of values is posted to the server (hence the need for square brackets).

    If you have setup the component correctly and you can see the array of data posted with firebug, you'll need to debug the issues on your server.

    Regards,

    Dan

  7. #137
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by abraxxa View Post
    I stumbled over this bug again in the current version, now it's in line 1423.
    Without the patch a valuesquery isn't performed when the value is shorter than the minChars property.
    Abraxxa,

    Testing q like that isn't advised as a store item with a value of 0 (zero) will fail to query.

    I'll consider it a bug if you can you please post a testcase and describe the problems you are having. Show me some code and some data with an explanation - thanks.

  8. #138
    Ext User
    Join Date
    Aug 2009
    Location
    Semi-retired in Mexico
    Posts
    47
    Vote Rating
    0
    frederickd is on a distinguished road

      0  

    Default


    @danh2000

    Thank you for taking a look at it. I will try to figure something out. The POST in FireBug from the JavaScript side shows the array elements. Dumping the fields on the PHP side after receiving the data yields only the last element. The previous ones are stripped for some reason.

    I was experimenting with the statement v = v.toString(); to remove the array. However, I do not know how to load the variable into the original field before sending it along for the POST.

    Do you think that is a viable approach? Thanks!

  9. #139
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by frederickd View Post
    @danh2000

    Thank you for taking a look at it. I will try to figure something out. The POST in FireBug from the JavaScript side shows the array elements. Dumping the fields on the PHP side after receiving the data yields only the last element. The previous ones are stripped for some reason.

    I was experimenting with the statement v = v.toString(); to remove the array. However, I do not know how to load the variable into the original field before sending it along for the POST.

    Do you think that is a viable approach? Thanks!
    It sounds too much like a workaround without addressing the problem - I'd always try to understand and resolve the real issue.

    Firstly, what does a screendump from the Firebug net panel look like showing the post data?

    Secondly, what does a dump of the $_POST data look like when it arrives on the server?

  10. #140
    Ext User
    Join Date
    Aug 2009
    Location
    Semi-retired in Mexico
    Posts
    47
    Vote Rating
    0
    frederickd is on a distinguished road

      0  

    Default


    Understood.

    Here is the POST from FireBug:

    data[Repairorder][advisor_id]1
    data[Repairorder][customer_email]
    fxxx@mac.com
    data[Repairorder][dealer_id]1
    data[Repairorder][distributor_id]
    1
    data[Repairorder][lof]
    Premium
    data[Repairorder][make]
    Toyota
    data[Repairorder][model]4-Runnerdata
    [Repairorder][number]
    RO20100107b
    data[Repairorder][odometer]13456
    data[Repairorder][odometer_type]
    Miles
    data[Repairorder][servicedate]
    2010-01-07
    data[Repairorder][services]
    data[Repairorder][services]
    Batterydata
    [Repairorder][services]
    Driveline
    data[Repairorder][vin]5TDZT34A05S250524
    data[Repairorder][year]
    2008

    Here is the POST data from my server just after receipt and before doing the save to the database:

    [POST data] => Array
    (
    [Repairorder] => Array
    (
    [distributor_id] => 1
    [dealer_id] => 1
    [advisor_id] => 1
    [number] => RO20100107b
    [servicedate] => 2010-01-07
    [customer_email] => fxxx@mac.com
    [vin] => 5TDZT34A05S250524
    [year] => 2008
    [make] => Toyota
    [model] => 4-Runner
    [odometer] => 13456
    [odometer_type] => Miles
    [lof] => Premium
    [services] => Driveline
    )

    )

    This is with the configuration option of hiddenName: 'data[Repairorder][services]'. Like this I have noticed that I can start entering characters in a little text box and the list of elements matching appear for selection, which is great. When I have the configuration option of hiddenName: 'data[Repairorder][services][]' that feature no longer works, but the blank array entry from the FireBug POST data is gone.

    I do not know why all the array elements would not be passed back to the server. I did notice that on the 2.x extensions forum for SuperBoxSelect someone else had a similar problem and solved it by having the JSON data show [Repairorder][services][]. So maybe it is because the JSON data is coming down as a text field, but trying to go back as an array.

    Maybe instead of a "workaround" a configuration option could be added like returnType with a default of 'array' but an option of 'text'.

    Just a thought...

Thread Participants: 94

  1. Animal (3 Posts)
  2. jay@moduscreate.com (1 Post)
  3. Condor (1 Post)
  4. stever (1 Post)
  5. mystix (5 Posts)
  6. MD (1 Post)
  7. JorisA (1 Post)
  8. randomY (1 Post)
  9. DigitalSkyline (1 Post)
  10. sj137 (3 Posts)
  11. boggle (1 Post)
  12. danh2000 (71 Posts)
  13. ostghost (1 Post)
  14. lossendae (1 Post)
  15. ZooKeeper (1 Post)
  16. greco (1 Post)
  17. Fredric Berling (1 Post)
  18. GraemeBryce (2 Posts)
  19. Strati (2 Posts)
  20. syscobra (2 Posts)
  21. boonkerz (4 Posts)
  22. Sesshomurai (3 Posts)
  23. shamansoft (1 Post)
  24. dorgan (2 Posts)
  25. mjhaston (1 Post)
  26. radtad (5 Posts)
  27. Joyfulbob (2 Posts)
  28. crysfel (1 Post)
  29. armandoxxx (2 Posts)
  30. jarlau (1 Post)
  31. lacco (1 Post)
  32. abraxxa (38 Posts)
  33. prometheus (1 Post)
  34. pops (1 Post)
  35. raphac (1 Post)
  36. Scorpie (2 Posts)
  37. supercharge2 (4 Posts)
  38. jmiguel (2 Posts)
  39. ash11tw (2 Posts)
  40. wojan (1 Post)
  41. ryzmen (1 Post)
  42. nmohler (2 Posts)
  43. wki01 (2 Posts)
  44. gacowarlock (1 Post)
  45. kora.kanchan (1 Post)
  46. senacle (3 Posts)
  47. genie_vn (1 Post)
  48. sergey.s (1 Post)
  49. Grolubao (10 Posts)
  50. mathec (1 Post)
  51. jackjia (1 Post)
  52. polydyne (1 Post)
  53. Antjac (1 Post)
  54. Thomas Triplet (1 Post)
  55. Gonfi (1 Post)
  56. kleins (1 Post)
  57. talha06 (1 Post)
  58. scishop (1 Post)
  59. eztam (2 Posts)
  60. frederickd (10 Posts)
  61. dusoo (2 Posts)
  62. iv_ekker (3 Posts)
  63. pym (1 Post)
  64. sudhirhv (3 Posts)
  65. lanhun (14 Posts)
  66. wcasado (1 Post)
  67. ramana_l_v (3 Posts)
  68. cq.yangyu@gmail.com (1 Post)
  69. siberian (1 Post)
  70. Tommi (4 Posts)
  71. rdblyth (2 Posts)
  72. devtig (3 Posts)
  73. markmansour (1 Post)
  74. dhiren.lodhia (1 Post)
  75. slamhan (1 Post)
  76. panter4 (1 Post)
  77. Korbin (2 Posts)
  78. istetska (1 Post)
  79. ian.young (1 Post)
  80. sebterzi (1 Post)
  81. ucoxk (1 Post)
  82. prakashr (1 Post)
  83. danilo.pederiva (1 Post)
  84. --miCZar-- (2 Posts)
  85. zozofoz (1 Post)
  86. spydercavern (1 Post)
  87. tvelykyy (1 Post)
  88. leorossi (3 Posts)
  89. revertTS (1 Post)
  90. joxzaren (1 Post)
  91. leduc (1 Post)
  92. deepthi_r (1 Post)
  93. qiankun (1 Post)
  94. Mr.Solomon (2 Posts)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar