Testing AJAX calls in CakePHP 2.8

2016-04-06 Thread Jaz
down votefavorite <http://stackoverflow.com/questions/36000402/testing-ajax-calls-in-cakephp-2-8#> I'm working with Cake 2.8.1. I've installed PHPUnit and am writing unit tests for my app. However, I've run into a problem when trying to test AJAX calls. My applicatio

Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-04 Thread Paulo Terra
Ok Diego, obrigado. Vou dar uma olhada. Abs! Em 04/04/2016 11:52, "Diego Mendonça" escreveu: > Eu utilizo esse aqui: https://viacep.com.br/ no próprio site tem um > tutorial de como fazer com JS > > -- > Diego Mendonça > meadiciona.com/diego182 > vamosfugir.net > > On Sun, Apr 3, 2016 at 7:59 PM,

Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-04 Thread Diego Mendonça
Eu utilizo esse aqui: https://viacep.com.br/ no próprio site tem um tutorial de como fazer com JS -- Diego Mendonça meadiciona.com/diego182 vamosfugir.net On Sun, Apr 3, 2016 at 7:59 PM, Paulo Terra wrote: > Sim, mas existem outros webservices confiáveis também. > > Em sábado, 2 de abril de 201

Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-03 Thread Paulo Terra
Sim, mas existem outros webservices confiáveis também. Em sábado, 2 de abril de 2016 20:06:03 UTC-3, Nilson Pena escreveu: > > O correio disponibiliza algum webservice gratuito? > > Em sábado, 2 de abril de 2016, Paulo Terra > > escreveu: > >> Estou tentando carregar o endereço a partir do CEP in

Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-03 Thread Paulo Terra
Oi Fabricio, obrigado pela resposta. Minha dificuldade maior é fazer a requisição Ajax. Apesar de ler a documentação e consultar alguns exemplos daqui do forum, nada funcionou. Em sábado, 2 de abril de 2016 19:43:43 UTC-3, Fabrício Muniz escreveu: > > Qual a dificuldade? > > 2016

Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-02 Thread Nilson Pena
O correio disponibiliza algum webservice gratuito? Em sábado, 2 de abril de 2016, Paulo Terra escreveu: > Estou tentando carregar o endereço a partir do CEP informado pelo usuário. > Apesar de encontrar várias pessoas perguntando por isso não encontro uma > resposta que funcione. Alguém já fez i

Re: Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-02 Thread Fabrício Muniz
Qual a dificuldade? 2016-04-02 18:09 GMT-03:00 Paulo Terra : > Estou tentando carregar o endereço a partir do CEP informado pelo usuário. > Apesar de encontrar várias pessoas perguntando por isso não encontro uma > resposta que funcione. Alguém já fez isso no CakePHP 3? > > -- > Sign up for our N

Carregar endereço a partir do CEP no CakePHP 3 usando AJAX

2016-04-02 Thread Paulo Terra
Estou tentando carregar o endereço a partir do CEP informado pelo usuário. Apesar de encontrar várias pessoas perguntando por isso não encontro uma resposta que funcione. Alguém já fez isso no CakePHP 3? -- Sign up for our Newsletter for updates. http://cakephp.org/newsletter/signup We will so

Re: ajax pagination

2016-01-07 Thread euromark
See http://sandbox3.dereuromark.de/sandbox/ajax-examples Mark Am Dienstag, 5. Januar 2016 10:21:29 UTC+1 schrieb Kamlesh Gupta: > > Hello, > > I am facing a problem of pagination in cakephp 3.14.. > > How can we make a ajax pagination in cakephp 3.1.4 > > wou

ajax pagination

2016-01-05 Thread Kamlesh Gupta
Hello, I am facing a problem of pagination in cakephp 3.14.. How can we make a ajax pagination in cakephp 3.1.4 would anyone please help me. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are

Re: How do I get Cake 3.1 to reply to an AJAX request without requiring a layout .ctp file?

2015-10-15 Thread heavyKevy
r and it is still not working. > > Here is the method in question: > public function getSalesPeopleSelectList() { > $this->request->accepts('json'); // No direct access via browser > URL > $dealerId = $this->request->params['pass'

Re: How do I get Cake 3.1 to reply to an AJAX request without requiring a layout .ctp file?

2015-10-14 Thread heavyKevy
; it in the Initialize method of the controller and enabled the 'json' > extension as mentioned earlier and it is still not working. > > Here is the method in question: > public function getSalesPeopleSelectList() { > $this->request->accepts(

Re: How do I get Cake 3.1 to reply to an AJAX request without requiring a layout .ctp file?

2015-10-14 Thread Kevin Arnett
e-select-list.json/47 Is this not correct? On Wed, Oct 14, 2015 at 4:40 PM, Anthony GRASSIOT wrote: > Did you correctly specify the data type json in your ajax call ? > Le 14 oct. 2015 09:02, "heavyKevy" a écrit : > >> I have gone through the documentation, which is a

Re: How do I get Cake 3.1 to reply to an AJAX request without requiring a layout .ctp file?

2015-10-14 Thread Anthony GRASSIOT
Did you correctly specify the data type json in your ajax call ? Le 14 oct. 2015 09:02, "heavyKevy" a écrit : > I have gone through the documentation, which is a bit too vague, and tried > many things, but I still am getting an error that the template file is > missing. >

How do I get Cake 3.1 to reply to an AJAX request without requiring a layout .ctp file?

2015-10-14 Thread heavyKevy
pts('json'); // No direct access via browser URL $dealerId = $this->request->params['pass'][0]; $this->RequestHandler->renderAs($this, 'ajax'); //$this->viewClass = 'Json'; $this->loadModel('SalesPeople

Re: cakephp ajax pagination

2015-07-13 Thread euromark
There are many different (and easy ways), IMO the best way would be one that also allows a fallback (non js in case js is broken or for google bot etc) see http://sandbox3.dereuromark.de/sandbox/ajax-examples/pagination for an example in cake3. mark Am Sonntag, 12. Juli 2015 13:23:07 UTC+2

cakephp ajax pagination

2015-07-12 Thread Daniel Uche
I am trying to do an ajax pagination in cakephp 3.0 but for some reason i can't get around it -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "Cake

CakePHP 3 Ajax Call Performance issue

2015-05-22 Thread Gopakumar PG
we have done the below code element ( text posting by ajax ) in cakephp 2.5 later we changed to cakephp 3 , it seems like the performance of the function is diminished to a very noticeable extend in cakephp 3 (mainly speed is decreased 250 ms to 1.4s) thanks in advance:) // ajax call to save

Re: Cake PHP 3.0 Ajax JSON

2015-05-03 Thread milan
You may try out the below steps: - Remove that search() from your Items controller. You should not need it. - Just Make the url: "/Items/searchData", instead of *url* *: "/Items/search"**,* in your ajax call - Add the below line in your searchData() $

Cake PHP 3.0 Ajax JSON

2015-05-01 Thread Vedashree Gowda
I am trying to implement a search module by using AJAX. There is an index.ctp file in my Items Controller and I have linked my index.ctp file of Items to my search.ctp file which is present under Items controller as below: For the search.ctp pages the URL displayed is : http

problema al cargar un div mediante ajax.

2015-04-16 Thread Alberto Ahumada
controlador. lo primero que se me vino a la mente fue hacerlo con ajax+jquery. entonces lo hice de la forma clasica $.ajax({ url: 'la direccion del controlador/la funcion', type: 'post', data: 'arreglo con los datos a enviar

Re: Cakephp Autocomplete Tutorial ajax error

2015-03-25 Thread Dario Espina
Check this: http://stackoverflow.com/questions/19911685/cakephp-trying-to-send-a-ajax-request/19938762#19938762 On Saturday, January 31, 2015 at 8:13:54 PM UTC-4, ajt wrote: > > > > In CakePHP, I am trying to create a autocomplete function from a textbox, > using this

Re: Action a postLink without refreshing page (AJAX?)

2015-02-08 Thread euromark
'Add to wishlist' link in the events listings page, > as the page refreshes and they may have to scroll down to continue browsing > where they left off. > > I've been messing about with PHP for years, but have little Javascript > experience and nothing AJAX-based. T

Action a postLink without refreshing page (AJAX?)

2015-02-07 Thread MarkB
but have little Javascript experience and nothing AJAX-based. Time is getting tight, so I'm wondering if there is anyone who can help me achieve this? Thanks! This is the code I use in my view: if ($wishlisted == NULL){ echo $this->Form->postLink('Add to wishlist', array('a

Re: Cakephp Autocomplete Tutorial ajax error

2015-02-01 Thread euromark
It is best not to use the JS helper(s) etc. Use just plain jQuery and it will work quite easily out of the box See http://sandbox.dereuromark.de/sandbox/ajax_examples/ for live examples mark Am Sonntag, 1. Februar 2015 01:13:54 UTC+1 schrieb ajt: > > > > In CakePHP, I am trying to create a autoc

Cakephp Autocomplete Tutorial ajax error

2015-01-31 Thread ajt
In CakePHP, I am trying to create a autocomplete function from a textbox, using this tutorial: http: //bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2 I keep getting a Undefined index: autoCompleteText I solved the helper issue as it finds the helper

CakePHP autocomplete tutorial ajax error

2015-01-31 Thread ajt
Hi, In CakePHP, I am trying to create a autocomplete function from a textbox, using this tutorial: http://bakery.cakephp.org/articles/matt_1/2011/08/07/yet_another_jquery_autocomplete_helper_2 I keep getting a Error: AutoCompleteHelper could not be found. Undefined index: autoCompleteText I

Re: Authentication and multiple ajax request

2015-01-17 Thread euromark
Well, what you are doing there is pretty wrong in the first place. Calling login($data) directly logs in whatever you send it (see the docs for details), rendering a form login process invalid and insecure. You should, just as with any other non-ajax request, properly use the Auth adapters to

Authentication and multiple ajax request

2015-01-17 Thread Ryan de Haast
Hi All I recently discovered that cake authentication class does not like multiple ajax requests. While recently testing my app, I found it would return a 403 error the moment I do multiple ajax requests on a logged in user. I managed to narrow it down to the following code: $auth = $this

Ajax populates form fields in cakephp 3

2014-10-07 Thread Jipson Thomas
Hi , Would you please let me know is there any sample code or tutorials to integrate ajax populated form input field in cakephp 3. I found some samples wth cakephp 2 but those are using js helper, so I am not sure how I can bring those in cake PHP 3. In my form I have a select box to select

How to use ajax to update values using drop down button in cakephp 1.2

2014-07-24 Thread mike brandon
Hi all, I am quite new to cakephp. So ...things which are easy for you are quite difficult for me now. Plz help me to get it soon. my problem is i am not able get the edit field id and cant edit it as click on edit button which i made.evrry time i have to get my search done.then,my search disa

Re: CakePHP 2.5.2 - Wizard previous step reload by ajax.

2014-06-30 Thread Archana Goyal
No, I didn't use session in wizard. My question is "How do I reload my saved data to my wizard form by ajax". On Monday, 30 June 2014 15:33:35 UTC+5:30, Andras Kende wrote: > > do you also use Sessions on that wizard ? > > Andras Kende > > > On Jun 30, 2014

Re: CakePHP 2.5.2 - Wizard previous step reload by ajax.

2014-06-30 Thread Andras Kende
do you also use Sessions on that wizard ? Andras Kende On Jun 30, 2014, at 2:36 AM, Archana Goyal wrote: > Hi, > > I am create wizard form. On every next steps of form my data saved in > database by ajax. But I am not able to reload form data on previous > botton.How do

CakePHP 2.5.2 - Wizard previous step reload by ajax.

2014-06-30 Thread Archana Goyal
Hi, I am create wizard form. On every next steps of form my data saved in database by ajax. But I am not able to reload form data on previous botton.How do I load form on previous step to stop saving duplicate data in database. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us

ajax pagination using datatables

2014-06-20 Thread Niranga Perera
is there a good example for ajax pagination using datatable plugin. The example in the documentation is not clear enough in areas like how to set the number of rows to display. sort and pagination is not working. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http

CakePHP Ajax login

2014-04-07 Thread Ben Robey
I've started using Cakephp for a new project that I'm doing and I've become stuck on how to login using client side technologies. The application will be accessing cake via restful api calls and I'm trying to get the login working using ajax but am unsure of how to write the

Re: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-03-23 Thread GBokiau
me" >> "url": "...",} >> >> However I just get an empty response and don't see where the AjaxView > does this ? > > Afaik this isn't standard Cake behaviour either ? (should/could be though > !) > > On Wednesday, February

Re: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-03-23 Thread GBokiau
? Afaik this isn't standard Cake behaviour either ? (should/could be though !) On Wednesday, February 5, 2014 5:22:41 PM UTC+1, advantage+ wrote: > > First off great article! > > http://www.dereuromark.de/2014/01/09/ajax-and-cakephp/ > > > Very informative. > >

'Returning' views as JSON(?) data via Ajax call

2014-03-13 Thread WhyNotSmile
I'm not sure whether what I'm trying to do is possible, but here goes! I have a page with a search box on it. When the user searches, 2 separate areas of the page should be re-rendered. Rather than doing this by refreshing the page, I want to do it via an Ajax call. One of the rende

Why does RequestHandler::beforeRedirect() "fake" AJAX redirects?

2014-02-18 Thread SacoDesign
I have a general question regarding the logic inside of RequestHandler::beforeRedirect() related to AJAX redirects. Why does CakePHP try to "fake" a redirect- why not just do a true redirect? This logic appears to be confusing the Security Component in my application (and I don

RE: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-06 Thread Advantage+
Right on, thanks. Will keep at it and see how it progress's Dave From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of euromark Sent: Thursday, February 06, 2014 11:00 AM To: cake-php@googlegroups.com Subject: Re: DerEuroMark - Ajax and CakePHP Tut

Re: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-06 Thread euromark
orites" type link. JS version click saved > / and simple response alert "Added to favotites and the link Favorites > (10)" now display "Favorites (11)" simply increase the counter. > > > > But how do you code the controller to reflect HTML or AJAX?

RE: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-06 Thread Advantage+
kmark Add to favorites" type link. JS version click saved / and simple response alert "Added to favotites and the link Favorites (10)" now display "Favorites (11)" simply increase the counter. But how do you code the controller to reflect HTML or AJAX? Remove the $

Re: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-06 Thread euromark
No that is totally what one would expect when browsing the json file. The thing is that this never happens with a normal user, as he executes AJAX which then calls this url. So never ever should it happen that a user really browses it directly (unless its a dev and he has a genuine reason to do

RE: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-06 Thread Advantage+
egroups.com] On Behalf Of euromark Sent: Thursday, February 06, 2014 6:52 AM To: cake-php@googlegroups.com Subject: Re: DerEuroMark - Ajax and CakePHP Tutorial Question Sounds like you didnt read the whole post. You probably skipped the "Last tips" part at the end - or it would be wo

Re: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-06 Thread euromark
ere was no .json extension and accessed http you get the expected error > page. > Which is what I was expecting with the $this->request->onlyAllow('ajax'); but > even accessing the .json (above link) you still end up with a result so the > onlyAllow does not seem to

RE: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-05 Thread Advantage+
; } If there was no .json extension and accessed http you get the expected error page. Which is what I was expecting with the $this->request->onlyAllow('ajax'); but even accessing the .json (above link) you still end up with a result so the onlyAllow does not seem to only all

Re: DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-05 Thread euromark
there is no need to remove it - but of course you can. it is good practice (that is outlined in the post if you read it) to always call the url with the correct extension of what you are expecting. rss => .rss xml => .xml ... and so for an ajax requestion with a json response it would be

DerEuroMark - Ajax and CakePHP Tutorial Question

2014-02-05 Thread Advantage+
First off great article! http://www.dereuromark.de/2014/01/09/ajax-and-cakephp/ Very informative. My only question is there a way to remove the .json extension in the url? Or is it needed to differentiate between views? Only other thing I came across was my AppController isAuthorized

Correctly using an ajax call?

2014-02-03 Thread Jasmun Hendrick
tems associated with an invoice. This is done in *Invoices/view.ctp.* 2. Include a button/link in *Invoices/view.ctp* that calls the form used to add a new invoice_item. This is currently done using an Ajax call (see code below) to *invoices/addInvoiceItem*. The data returned fr

Re: Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-21 Thread euromark
I think with CakePHP you already got the most simple approach there is. Use the Cake tools correctly, and you can serve AJAX in almost 1-2 lines of code. See http://www.dereuromark.de/2014/01/09/ajax-and-cakephp/ for exampe. Am Montag, 20. Januar 2014 15:58:41 UTC+1 schrieb Sam: > > I h

Re: Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-20 Thread José Lorenzo
I don't know much of other frameworks, but I can list why doing it in CakePHP is a snap * Automatic rendering of json views depending on the accept headers including error pages * Automatic layout selections for ajax calls that return html * The CRUD plugin, a super simple yet extr

Re: Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-20 Thread Sam
. Would you happen to know of any? May I ask why CakePHP is simpler to work with ajax compared to other frameworks? On Monday, January 20, 2014 11:15:20 PM UTC+8, José Lorenzo wrote: > > I think it does matter to certain degree, if the framework helps you > select the templates and layou

Re: Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-20 Thread José Lorenzo
I think it does matter to certain degree, if the framework helps you select the templates and layouts to use when requesting some content via ajax or as another type (like json or xml), you end up saving a lot of time. You're on the good place, then. CakePHP makes it extremely simple to

Re: Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-20 Thread Jeremy Burns : Class Outfit
CakePHP is absolutely fine for Ajax. Your approach sounds right - it’s what I do. On 20 Jan 2014, at 14:58, Sam wrote: > I have an upcoming project which may use lots of ajax dynamic front-end > features. Does the choice of framework matter to ease of ajax dynamic > front-end codin

Does the choice of framework matter to ease of ajax dynamic front-end coding?

2014-01-20 Thread Sam
I have an upcoming project which may use lots of ajax dynamic front-end features. Does the choice of framework matter to ease of ajax dynamic front-end coding? I have never used ajax before, so I am kind of nervous at whether cakephp would be the right choice or if there is a simpler framework

Re: Ajax update of JpGraph in CakePHP

2014-01-01 Thread Pancho Carpio
Beautiful, no need to use ajax with this simple, yet elegant solution. Maybe? Hell yeah! On Saturday, January 12, 2008 4:44:33 AM UTC-5, majna wrote: > > > > > maybe? > > On Jan 12, 12:24 am, xerazur wrote: > > Hi everyone, > > > > I am curren

Ajax and Assets Question

2013-12-31 Thread Advantage+
ed random_view.ctp /* additional js and css for page */ //$this->Less->add(array('uploader.css')); $this->Compressor->add_libs('js', array( 'autoUploader', 'jquery.blockUI', 'jquery.form&#

Re: Cakephp 2.x ajax edit not working in Firefox and Opera

2013-12-19 Thread cake_beginner
im also having this kind of problem. does anyone know what's wrong with this one? On Friday, September 14, 2012 6:23:05 AM UTC+8, incognito wrote: > > Hi, > > I am basically trying to create an ajax edit form. > This is the edit link code > > Js->link('

Re: Tree helper, with ajax select boxes

2013-11-09 Thread euromark
irectly and I will show you. > > > > I have a nested menu in a tree and selects based on the parent and > displays the children with drop downs which are selects and save on > changing via ajax. > > > > *Dave Maharaj* > > *Freelance Designer | Developer* &g

RE: Tree helper, with ajax select boxes

2013-11-08 Thread Advantage+
I have done it. Took a while but I have it created. Contact me directly and I will show you. I have a nested menu in a tree and selects based on the parent and displays the children with drop downs which are selects and save on changing via ajax. Dave Maharaj Freelance Designer

Tree helper, with ajax select boxes

2013-11-08 Thread Thomas Goeminne
Hi, I am trying to find out how I can use the Tree structure, to create multilevel dropdown boxes using ajax. User starts by selecting a child which is a directchild from root, when selected if there are children to that node, a new select box for those direct children shows up, then when

Re: Ajax request

2013-09-25 Thread Gaurav Matta
term.'%\''), > 'limit'=>500 > )); > > $this->set('clients', $clients); > } > > } > * > View:* > > > $(function() { > $( "#element"

Re: Ajax request

2013-09-25 Thread Gaurav Matta
You will need to rewrite the autocomplete code on page you are requesting on the fly for search. If I am correct your search is also Ajax based... On 25-Sep-2013 6:47 PM, wrote: > Hello, > I have a problem with a search field on my site and I hope you can help > me. I got a table called

Ajax Request

2013-09-25 Thread webgaertner
} * View:* $(function() { $( "#element", this ).keyup(function( event ) { if( $(this).val().length >= 4 ) { $.ajax({ url: '/clients/index/' + escape( $(this).val() ),

Ajax request

2013-09-25 Thread webgaertner
} * View:* $(function() { $( "#element", this ).keyup(function( event ) { if( $(this).val().length >= 4 ) { $.ajax({ url: '/clients/index/' + escape( $(this).val() ),

Re: ajax validation with rules from model

2013-09-12 Thread jminkler
Why Ajax? Why not build it into HTML5 validation? On Wednesday, September 11, 2013 8:42:25 AM UTC-4, Dmitry Romanov wrote: > > I'm looking some CakePHP plugin for ajax validation. > > Requirements: > 1. Gets validate rules from Model > 2. Validates after edit of

Re: ajax validation with rules from model

2013-09-12 Thread Mike Karthauser
On 12 Sep 2013, at 15:38, jminkler wrote: > Why Ajax? Why not build it into HTML5 validation? backwards compatibility for non html5 compliant browsers (cough ie6/7) > > On Wednesday, September 11, 2013 8:42:25 AM UTC-4, Dmitry Romanov wrote: > I'm looking some CakePH

RE: ajax validation with rules from model

2013-09-11 Thread Advantage+
nesday, September 11, 2013 10:12 AM To: cake-php@googlegroups.com Subject: ajax validation with rules from model I'm looking some CakePHP plugin for ajax validation. Requirements: 1. Gets validate rules from Model 2. Validates after edit of input field Thanks. -- Like Us on Fac

ajax validation with rules from model

2013-09-11 Thread Dmitry Romanov
I'm looking some CakePHP plugin for ajax validation. Requirements: 1. Gets validate rules from Model 2. Validates after edit of input field Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message becaus

Re: Ajax Login - Redirect Help

2013-09-10 Thread Mirza Irfan
Your ajax response should send a flag or some value if the session is expired. When you receive the Ajax response and finds that value use, javascript to redirect the page. //Javascript window.location() Google the exact syntax, i am just guiding you. On Fri, Sep 6, 2013 at 1:51 AM, Advantage

RE: Ajax Login - Redirect Help

2013-09-05 Thread Advantage+
Thanks for the feedback, What I ended up doing is not optimal but it works. App Controller: public function beforeFilter() { if($this->request->is('ajax') &&(

Re: Ajax Login - Redirect Help

2013-09-05 Thread Jeremy Burns : Class Outfit
5 Sep 2013, at 21:51, "Advantage+" wrote: > I have / working on a site where 90% of the admin area is handled via ajax / > json. > > So I am at the point where I login, destroy the session (on purpose) and try > to perform an action, which obviously fails but how can I t

Ajax Login - Redirect Help

2013-09-05 Thread Advantage+
I have / working on a site where 90% of the admin area is handled via ajax / json. So I am at the point where I login, destroy the session (on purpose) and try to perform an action, which obviously fails but how can I trigger it to force the user back to login page, your session has expired

Ajax / CRSF / Security

2013-08-16 Thread Advantage+
I created a plugin that handles all security issues with Cake / Ajax requests. Simply add a $this>_secureForm() which adds a _key and it adds a token to the form and on request the _key matches the users _lock Controller will generate a new key on every request. All though it w

Re: Security and Ajax

2013-08-08 Thread Jeremy Burns : Class Outfit
Because the keys are 'use once', so when submitted by ajax become invalid. See this page for a solution: http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::$csrfUseOnce Jeremy Burns Class Outfit http://www.classoutfit.com On 8 Aug 2

Security and Ajax

2013-08-08 Thread Advantage+
I know forms submitted via ajax that the security component does not work. (Checking for edits / tampering) What is the reason for this? I understand if you add fields dynamically why it would not work because of the hashed fields when the form is rendered. But if you are simply sending a

Problem with ajax

2013-07-24 Thread Rafael Neves
tends AppController { > public function delete(){ > $this->layout = 'ajax'; > $this->set('delete', date('d/m/Y')); > } > } > The delete view looks like: true, 'html' => $delete)); > ?> In

Re: CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread Dakota
uly 2013 13:45:11 UTC+2, Juraj Vlk wrote: > > I'm trying to save data which comes from Ajax POST request in JSON but > There is empty $this->request->data in controller. > > My Ajax call: > > $.ajax({ > type: "POST", > url: 'localhost/p

Re: CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread 清水紘己
using $(form).serialize() for data works fine. alternative way is $.param(pass_data) 2013/7/2 Juraj Vlk > I'm trying to save data which comes from Ajax POST request in JSON but > There is empty $this->request->data in controller. > > My Ajax call: > > $.ajax({

Re: CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread Gaurav Matta
http://itfeast.blogspot.in/2013/06/cakephp-send-multiple-elements-in-ajax.html?m=1 Follow above link might help you or see jshelper for this version of cake On 02-Jul-2013 7:56 PM, "Juraj Vlk" wrote: > I'm trying to save data which comes from Ajax POST request in JSON but >

CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread Juraj Vlk
I'm trying to save data which comes from Ajax POST request in JSON but There is empty $this->request->data in controller. My Ajax call: $.ajax({ type: "POST", url: 'localhost/pages/register', dataType: 'json', data: pass_data, });

Creating Ajax Pagination with Cakephp 2.3.x

2013-06-18 Thread cyletech
Hello dear, I created ajax pagination with cakephp 2.3.x but it does not work. i describe how i did following. *Note:* i am about creating pagination in PagesController. /in AppController:/ /in PagesController:/ /in Pages/ajax.ctp/ /in Layouts/default.ctp/ *Note:* There is no error or

Re: Cakephp Ajax sample code for complete newbie

2013-06-12 Thread Hiệp Nguyễn
Thanks a lot! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Ajax Pagination with Filter Plugin Problem

2013-06-07 Thread Sanjeev Divekar
.on('click','#yourSelector',function(event) {//do somethings > here}); > > You need to stick the event on the body (or any other parent dom object > that is not updated, using body is the safe way), so the event still works > if html is added by an ajax request.

Re: Cakephp Ajax sample code for complete newbie

2013-06-07 Thread Norris
http://www.reversefolds.com/articles/show/ajax and lots of other tutorial if you search on google Pada Jumat, 24 Mei 2013 16:19:49 UTC+7, Sam menulis: > > Dear CakePHP experts, > > Can someone provide some links to sample code or tutorial that teaches a > complete Ajax newbie o

Re: Ajax Pagination with Filter Plugin Problem

2013-06-07 Thread Yorick Horrie
ther parent dom object that is not updated, using body is the safe way), so the event still works if html is added by an ajax request. Op dinsdag 10 juli 2012 05:18:55 UTC+2 schreef Sanjeev Divekar het volgende: > > I have already tried this but not working. > > On Mon, Jul 9, 2012 at 1

Ajax Pagination Example

2013-05-30 Thread my123
Hi Guys, I am a new to CakePHP. I got the basic example running in my local environment. I need to implement Ajax based pagination of search results returned from a database query. I have been unsuccessfully searching the internet for a simple ajax pagination CakePHP example. I have lost lot

Re: Cakephp Ajax helper or Jquery?

2013-05-27 Thread Leigh Mackay
nt and the resources above. Sam use progressive enhancement and live in the future. http://www.youtube.com/watch?v=HqdJkFM3pSM On Friday, May 24, 2013 7:21:45 PM UTC+10, Sam wrote: > > Hi Cakephp experts, > > I would like to try out Ajax. May I know what are the pros and cons of >

Re: Cakephp Ajax helper or Jquery?

2013-05-27 Thread André Luis
I used to work like this, but now i´m using the ajax prefix to keep more organized... BUT it´s only my suggestion :D Em sábado, 25 de maio de 2013 02h29min01s UTC-3, advantage+ escreveu: > > Why prefix it? > > > > If $this->request->is('ajax') then do

Re: Cakephp Ajax helper or Jquery?

2013-05-26 Thread Leigh Mackay
Using the Cake Ajax/JavaScript helpers means Cake will write your JavaScript. Using jQuery means you write it. Writing your own jQuery means you have more separation and you can keep your javascript out of your views and place it in it's own file. Reading as much as you can about progre

Re: Cakephp Ajax helper or Jquery?

2013-05-26 Thread Chris
download and add jquery ajax helper http://www.cakephp.4uk.pl/ and use jquery libs On Friday, May 24, 2013 2:21:45 AM UTC-7, Sam wrote: > > Hi Cakephp experts, > > I would like to try out Ajax. May I know what are the pros and cons of > Cakephp Ajax helper and Jquery? I hav

Re: Cakephp Ajax helper or Jquery?

2013-05-26 Thread Leigh Mackay
t; *function *sendData*(*sel*){* > >*var *$form = $*(*sel*)*; > >$*(*sel*)*.submit*(function(*e*) {* > > * *e.preventDefault*()*; > > > > $.ajax*({* > > * *type: "

RE: Cakephp Ajax helper or Jquery?

2013-05-26 Thread Advantage+
(function(e) { e.preventDefault(); $.ajax({ type: "POST", url: $(sel).attr('action'), data: $(sel).formSerialize(),

Re: Cakephp Ajax helper or Jquery?

2013-05-25 Thread Leigh Mackay
Hi Sam, Progressive enhancement is a very elegant solution for Ajax and UI. Build your app without any Ajax/JavaScript. Use the app controllers before filter to change the layout on ajax requests. public function beforeFilter() { if ($this->request->is('ajax')) { $th

RE: Cakephp Ajax helper or Jquery?

2013-05-24 Thread Advantage+
Why prefix it? If $this->request->is('ajax') then do what ever. From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of André Luis Sent: Friday, May 24, 2013 2:09 PM To: cake-php@googlegroups.com Subject: Re: Cakephp Ajax helper or Jquery? I usua

Re: Cakephp Ajax helper or Jquery?

2013-05-24 Thread André Luis
I usually use the same controller for ajax, but use prefixes for ajax requests ajax_index, ajax_edit, ajax_delete... Em sexta-feira, 24 de maio de 2013 06h21min45s UTC-3, Sam escreveu: > > Hi Cakephp experts, > > I would like to try out Ajax. May I know what are the pros and cons o

Re: Cakephp Ajax helper or Jquery?

2013-05-24 Thread mrenigma
Hi Sam, I would suggest using jQuery and creating your own ajax controller. The reason I recommend this is because you can optimise the code in a lot more detail and if you've never dealt with AJAX learning how to do it without Cake's magic is a good place to begin. Cheers mrenigma

Cakephp Ajax helper or Jquery?

2013-05-24 Thread Sam
Hi Cakephp experts, I would like to try out Ajax. May I know what are the pros and cons of Cakephp Ajax helper and Jquery? I have never touched ajax and would like to know which is a better choice as a start. Thank you very much. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us

Cakephp Ajax sample code for complete newbie

2013-05-24 Thread Sam
Dear CakePHP experts, Can someone provide some links to sample code or tutorial that teaches a complete Ajax newbie on using Cakephp with Ajax? I tried searching but could not find much useful links. Thank you very much. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on

  1   2   3   4   5   6   7   8   9   10   >