Problem with ajax

2013-07-24 Thread Rafael Neves
Good day.

I want to have a button to delete a field in the database.

I'm trying to return the date only for debugging, it goes right after I do 
the action to delete the database.


My AtividadesController is declared with the delete function as below:

class AtividadesController extends AppController {
 public function delete(){
 $this-layout = 'ajax';
 $this-set('delete', date('d/m/Y'));
 }
 }



The delete view looks like:

?php
echo json_encode(array('success' = true, 'html' = $delete));

 ? 



 
In the index view I have to delete the button and the div to receive the 
message:

div id=msg/div;
 tdbutton id=btnExcluir/button/td;




In'm calling my default file. Js:

echo $this-Html-script('myajax');




And finally my myajax.js, which is in the folder webroot / js:

$(document).ready(function(){
$(#btn).click(function(){
$.get(
atividades/delete/,
null,
function(data){
var retorno = jQuery.parseJSON(data);
if(retorno.success){
$(#msg).html(retorno.html);
}
}
);
});

 }); 




Anyway, I click the delete button and nothing happens.

I thank anyone who can help.

Hug.
Rafael.

-- 
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 cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem with Ajax Pagination

2012-05-15 Thread neto la'neta
in ur controller u can use:

if($this-request-is('ajax')){
$this-render('ajax_view'); // had to be in the views folder for the 
controller u r using
}

dont include the box u r updating the the ajax view, and keep out of that 
box the links of the paginator helper.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with Ajax Pagination

2012-05-15 Thread supp...@deep-coding.net
What should I put in the 'ajax_view.ctp'?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with Ajax Pagination

2012-05-15 Thread Jimit Kapadya
Hello

My problem is how to impliment placeholder in cakephp 2.0

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with Ajax Pagination

2012-05-11 Thread supp...@deep-coding.net
Hey there, 

I have a problem again :)
I want to use the ajax Pagination, but it doesn't work 100%.
If I click on next I get the content of the second page with ajax.
But if I click then on next, I get the content of the third page, but 
without ajax, so the page reloads.
If I click then on next, I get the content of the fourth page with ajax.
So on every second page the ajax request doesn't work.
Here is my code:

?php
 $this-Paginator-options(array(
 'update' = '#rightCol',
 'evalScripts' = true
 ));
 ?
 div class=boxWideFoot
 div style=float:left;?php echo 
 $this-Paginator-counter();?/div
 div style=float:right;
 ?php
 echo $this-Paginator-prev('Previous', null, null, 
 array('class' = 'disabled'));
 echo $this-Paginator-numbers();
 echo $this-Paginator-next('Next', null, null, array('class' 
 = 'disabled'));  
 ?
 /div
 /div

Can anybody help me please?
Thanks 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with ajax code in cake 2

2012-01-14 Thread Daniel
In Cake 2 I am using the following code in a add.ctp view file:
?php echo $ajax-link('Can not read this code? Reload.','regenerate
code',array('url'='reload_captcha', 'update'='captchaID')); ?

... gives the error:
Notice (8): Undefined variable: ajax [APP\View\Users\add.ctp, line 16]

I then tried:
?php echo $this-Ajax-link('Can not read this code?
Reload.','regenerate code',array('url'='reload_captcha',
'update'='captchaID')); ?

... gives the error:
Fatal error: Call to a member function link() on a non-object in C:
\xampp\htdocs\xx\View\Users\add.ctp on line 16

Also what should reload_captcha be is it a file (what directory should
it be in?) or is it something else (an action?)

Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with ajax code in cake 2

2012-01-14 Thread 100rk
AjaxHelper was removed.

http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::link

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with ajax code in cake 2

2012-01-14 Thread Daniel
On Jan 14, 4:14 pm, 100rk lubomir.st...@gmail.com wrote:
 AjaxHelper was removed.

 http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelpe...

OK, I changed it to:

?php echo $this-Js-link('Can not read this code? Reload.',
'reload_captcha', array('update'='captchaID')); ?

What should reload_captcha be is it a file (what directory should
it be in?) or is it something else (an action?)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with ajax code in cake 2

2012-01-14 Thread jeremyharris
The link takes the same parameters as the HtmlHelper::link() method. So, 
the second parameter is the url it's going to fetch. It will fetch that URL 
and update it with the selector you defined in the 'update' key in the 
options parameter.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: problem in AJAX star rating plugin v2.4

2011-10-07 Thread WebbedIT
Have you checked the image exists at the path?

On Oct 5, 3:55 pm, taqman filler taqman...@gmail.com wrote:
 when run page star image not found
 and when click it I got internal server error

 thank

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


problem in AJAX star rating plugin v2.4

2011-10-05 Thread taqman filler
when run page star image not found
and when click it I got internal server error

thank

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with Ajax submit URLs using string vs array notation

2011-05-12 Thread Matt W.
Hi.  I'm still somewhat new, and tinkering around with the tutorial
blog application, and having some trouble when trying to create an
ajax-ified comment submission form, specifically with the url that the
form ends up submitting to.  This is the code I'm using for the form:

?=$form-create('Comment',
array('url'=array('controller'='comments', 'action'='add'))); ?
?=$form-input('Comment.name');?
?=$form-input('Comment.content');?
?=$form-input('Comment.post_id', array('type'='hidden', 'value'=
$post['Post']['id']));?
?=$this-Js-submit('Add
Comment',array('update'='comments','url'=array('controller'='comments',
'action'='add')),false);?
?=$this-Js-writeBuffer();?

When I use this (with the jQuery JS engine), this JS is generated:
$(document).ready(function () {$(#submit-1025595286).bind(click,
function (event) {$.ajax({data:$
(#submit-1025595286).closest(form).serialize(), dataType:html,
success:function (data, textStatus) {$(comments).html(data);},
type:post, url:\/posts\/comments\/add});

The issue is the url there; that should be just /comments/add , rather
than /posts/comments/add . When I use a string instead for the URL in
the code ('url' = '/comments/add'), the URL is what I expect.  Is
there something I'm missing with the array notation?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


I got problem in ajax

2011-04-25 Thread taq
i'm student and now i study cakephp with begining in cakephp from
novice to professional

and i practice follow example in book

i have problem in ajax example . i create form to recive comment and
update with ajax

but i click submit buttom no event

commentcontroller

http://upic.me/i/df/commentcontroller.jpg

view

http://upic.me/i/5w/2view.jpg

code view

http://upic.me/i/m9/viewcode.jpg

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: I got problem in ajax

2011-04-25 Thread Jeremy Burns | Class Outfit
Try $this-Comment-create() rather than $comment-create()

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 25 Apr 2011, at 07:15, taq wrote:

 i'm student and now i study cakephp with begining in cakephp from
 novice to professional
 
 and i practice follow example in book
 
 i have problem in ajax example . i create form to recive comment and
 update with ajax
 
 but i click submit buttom no event
 
 commentcontroller
 
 http://upic.me/i/df/commentcontroller.jpg
 
 view
 
 http://upic.me/i/5w/2view.jpg
 
 code view
 
 http://upic.me/i/m9/viewcode.jpg
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: I got problem in ajax

2011-04-25 Thread Tilen Majerle
yes, $this-Comment-create()

and look at your controller class name

it should be: CommentsController
you have: CommentsComtroller

--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/4/25 Jeremy Burns | Class Outfit jeremybu...@classoutfit.com

 Try $this-Comment-create() rather than $comment-create()

 Jeremy Burns
 Class Outfit

 jeremybu...@classoutfit.com
 http://www.classoutfit.com

 On 25 Apr 2011, at 07:15, taq wrote:

  i'm student and now i study cakephp with begining in cakephp from
  novice to professional
 
  and i practice follow example in book
 
  i have problem in ajax example . i create form to recive comment and
  update with ajax
 
  but i click submit buttom no event
 
  commentcontroller
 
  http://upic.me/i/df/commentcontroller.jpg
 
  view
 
  http://upic.me/i/5w/2view.jpg
 
  code view
 
  http://upic.me/i/m9/viewcode.jpg
 
  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.
 
 
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem Using Ajax in Cakephp

2011-03-18 Thread Shashank
Finally i am able to use ajax. But now there is one more problem. I use 1)
Ajax form 2) And made an ajax request through jquery.

These are two different forms. For one form i used the ajax form.

And for second one i used the jquery to make the ajax request.

Bt the issue now i am facing is ajax forms need prototype.js and the other
one i used need jquery.js. and as everyone know they r conflicting with each
other. If i remove prototype.js then ajax form stops working and i fi remove
juery my other form stops working. The issue is can anyone tell me hjow to
make the ajax form work only based on jquery.

On Fri, Mar 18, 2011 at 1:19 AM, Jens Dittrich jdittr...@gmail.com wrote:

 You should read the book. Especially the section about the JsHelper
 http://book.cakephp.org/view/1593/Methods
 The function you might want to use is request().

 On 17 Mrz., 09:36, Shashank cooldude17202...@gmail.com wrote:
  Hi,
  I am badly stuck in  a problem here.
  The situation is something like this, i have some feature of a social
  networking site in my site that is under development. What i want is
  that when a user updates his status, the page should not get
  refreshed, it shud just make and ajax call and return the updated
  status with the username and time just below it.
 
  Also i want that the ajax response should return a Like and Comment
  form along with the updated status so that anyone can comment or like
  it.
  And one more thing is i have tried using ajax, but i caught into a
  problem that is the ajax response from the controller being called
  always updates the complete data of the div, bt i want it to append
  the data so that the previous data is also there.
 
  I have accomplished all these tasks without using ajax i.e. a user can
  post an update and anyone can comment or like it. But i want it to be
  done through ajax as i dont want the page to get reloaded.
 
  Any help will be greatly appreciated.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
Shashank Singh
B.E.(Computer Science)
Software Developer
+91-9711882054
+91-9560545085
Skype id: shashank.singh87
Email: shashank.si...@sourcefuse.com

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem Using Ajax in Cakephp

2011-03-18 Thread cricket
On Fri, Mar 18, 2011 at 2:02 AM, Shashank cooldude17202...@gmail.com wrote:
 Finally i am able to use ajax. But now there is one more problem. I use 1)
 Ajax form 2) And made an ajax request through jquery.
 These are two different forms. For one form i used the ajax form.
 And for second one i used the jquery to make the ajax request.
 Bt the issue now i am facing is ajax forms need prototype.js and the other
 one i used need jquery.js. and as everyone know they r conflicting with each
 other. If i remove prototype.js then ajax form stops working and i fi remove
 juery my other form stops working. The issue is can anyone tell me hjow to
 make the ajax form work only based on jquery.

I think you're confusing the terminology. They're both using ajax. By
ajax form do you mean CakePHP's AjaxHelper? You can use that with
JQuery, also. If you're using Cake 1.3.x.

I think a better solution would be to skip the AjaxHelper and handle
it entirely with yourown code written with jquery.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem Using Ajax in Cakephp

2011-03-17 Thread Shashank
Hi,
I am badly stuck in  a problem here.
The situation is something like this, i have some feature of a social
networking site in my site that is under development. What i want is
that when a user updates his status, the page should not get
refreshed, it shud just make and ajax call and return the updated
status with the username and time just below it.

Also i want that the ajax response should return a Like and Comment
form along with the updated status so that anyone can comment or like
it.
And one more thing is i have tried using ajax, but i caught into a
problem that is the ajax response from the controller being called
always updates the complete data of the div, bt i want it to append
the data so that the previous data is also there.

I have accomplished all these tasks without using ajax i.e. a user can
post an update and anyone can comment or like it. But i want it to be
done through ajax as i dont want the page to get reloaded.

Any help will be greatly appreciated.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem Using Ajax in Cakephp

2011-03-17 Thread Jens Dittrich
You should read the book. Especially the section about the JsHelper
http://book.cakephp.org/view/1593/Methods
The function you might want to use is request().

On 17 Mrz., 09:36, Shashank cooldude17202...@gmail.com wrote:
 Hi,
 I am badly stuck in  a problem here.
 The situation is something like this, i have some feature of a social
 networking site in my site that is under development. What i want is
 that when a user updates his status, the page should not get
 refreshed, it shud just make and ajax call and return the updated
 status with the username and time just below it.

 Also i want that the ajax response should return a Like and Comment
 form along with the updated status so that anyone can comment or like
 it.
 And one more thing is i have tried using ajax, but i caught into a
 problem that is the ajax response from the controller being called
 always updates the complete data of the div, bt i want it to append
 the data so that the previous data is also there.

 I have accomplished all these tasks without using ajax i.e. a user can
 post an update and anyone can comment or like it. But i want it to be
 done through ajax as i dont want the page to get reloaded.

 Any help will be greatly appreciated.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with ajax pagination and mootools

2010-08-13 Thread Mariano C.
I have followed perfectly this guide (
http://mark-story.com/posts/view/creating-simple-ajax-pagination-with-cakephp-1-3-and-mootools
) but it only works at 50%.

I just have two link for pagination: 1  2. If I reach page through:
http://my_web.com/items/admin/page:1 the link to page 2 is active, if
I click this link the second page will be opened in ajax style. OK!
Now, link for page 2 is disabled and link for page 1 is active, but,
if I click this link the page will be reloaded entirely as normal
call.

Viceversa happen if I call http://my_web.com/items/admin/page:2. Click
on page 1 will happen in AJAX, successivly clicking on page 2 will
happen with classic call.

Why?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Hi i have a problem with Ajax related to cakephp

2010-07-28 Thread rakeshyadav rakeshyadav
Hi Good Morning All,

I am using Ajax submit button like
?php
   echo $ajax-submit('Search',array(

'url'= array(

'controller'='reports',

'action'='activitysearch'),

 'update' = 'activitydiv'));

 ?

  and i am getting resulst on perticulsr div
activitydiv everything is fine but when com to error handiling i am giving
some flash messge. my requirement is to set that flash message on top of the
page. but it is giving on the same division.

Thanks in advance
Rakesh

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


A problem with ajax that is hard to reproduce

2010-02-07 Thread @pauldatta
I am ajax loading some html using javascript. Occasionally, instead of
my responseText from being sent, the action send back the entire page
with a flash message - request error. Imagine how funny it looks when
it gets loaded into a div. This is very hard to reproduce. It usually
happens once in a while.


This is my action in question --

/**
 * This interacts with my formbuilding js - its the view that does
the trick here
 */
function buildform() {
if ($this-RequestHandler-isAjax()) {
configure::write('debug',0); //I am not a noob :)
[hopefully]
$this-layout = 'ajax'; //I tried this and the problem
occurs 1/20 atttempts
//$this-autoRender= false; //I did this first with no
view file and the problem occurs 1/10 times approx
$result = $this-{'_render'.$this-params['named']
['action']}($this-params['named']['type'] , isset($this-
params['named']['id']) ? $this-params['named']['id'] : null);
$this-set('result',$result);
} else {
$this-Redirect-flashWarning('Request Error');
}
}

My buildform.ctp does an echo of $result which basically is a string
of html markup.
As you can see Ive already tried a number of things in order to
prevent the problem from recurring but am fresh out of ideas.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-16 Thread crisuwork
You can try to use for test a classic function working with jQuery
framework like

// jQuery ajax example
function ResetPasswordAjax(){

var email  = document.getelementbyid(email).value;

 $.ajax({
   type: GET,
   url: http://eopp.de/users/login/+email+;,
   data: ,
   success: function(msg){
alert( Password reset succesfully!);
   }
 });
}

and then you call this function on submit like

input type='submit' onclick='ResetPasswordAjax()'

var email  = document.getelementbyname(email).value;

On 14 Dez., 21:03, AD7six andydawso...@gmail.com wrote:
 On 14 dic, 20:55, thomaus tho...@saimiris.com wrote:

  Nobody no clue?

 Try using firebug to give you an error message and/or debug the
 javascript. If you continue to have problems here's a clue: you have a
 (primarily) javascript only question - this isn't a javascript
 specific place :)

 AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-14 Thread thomaus
Nobody no clue?

On Dec 11, 7:16 pm, thomaus tho...@saimiris.com wrote:
 No request with Firebug. I don't get it, really...

 On Dec 11, 11:04 am, Mukhamad Ikhsan ikhsan.o...@gmail.com wrote:

  do you have a firebug? you can see what the response for XHR request

  On Fri, Dec 11, 2009 at 4:57 PM,thomaustho...@saimiris.com wrote:
   Nobody no clue?

   On Dec 10, 10:04 am,thomaustho...@saimiris.com wrote:
Hi John,

I just did and... still nothing at all when clicking!

Thanks,

On Dec 10, 7:20 am, John Andersen j.andersen...@gmail.com wrote:

 Have you added the javascript libraries?
 - prototype
 - scriptaculous

 Enjoy,
    John

 On Dec 9, 9:03 pm,thomaustho...@saimiris.com wrote:

  Hi John,

  Thanks for helping.

  I actually made a mistake when pasting the code. The original trial
  was

  ?php echo $ajax-submit(__('send', true), array('url'= array
  ('controller'='users', 'action'= 'recoverPassword'), 'class'=
  'button', 'update' = 'messages')); ?

  and the same happens, basically nothing nothing at all when I click
   on
  the Send button.

  Don't know if it helps but here is the corresponding generated HTML
  code :

  div class=submitinput type=submit url= class=button
  value=Send id=submit116667344 onclick=event.returnValue = 
  false;
  return false; //divscript type=text/javascript
  //![CDATA[
  Event.observe(submit116667344, 'click', function(event) { new
  Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
  {asynchronous:true, evalScripts:true, parameters:Form.serialize
  (Event.element(event).form), requestHeaders:['X-Update',
  'messages']}) }, false);
  //]]
  /script
  /form
  /div

  Thanks,

  On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:

   I do observe that your ajax-submit is supposed to call your
   login
   action in your users controller and not your recoverPassword
   action!
   Please check your code or your statement :)
   Enjoy,
      John

   On Dec 9, 3:03 pm,thomaustho...@saimiris.com wrote:

Hi there,

I just built an AJAX form and it doesn't work at all!

My code:

div id=messages style=display: none
h3Recover lost password/h3
pEnter your e-mail address and we will send a reset link to
   your
email
?php echo $form-create('User'); ?
                        ?php echo $form-input('email',
   array('label' = __('Your
Email', true), 'class' = 'text-input')); ?
                        div class=clearbr //div

                        ?php echo $ajax-submit(__('Send',
   true),

                 array('url'= array('controller'='users', 'action'=
'login'),

                 'class'= 'button',

                 'update' = 'messages')); ?

?php echo $form-end(); ?
/div !-- End #messages --

The button appears and when I click on it, absolutely nothing
   happens
while if I type myapp/users/recoverPassword in my browser it of
   course
calls my controller correctly.

Thanks in advance,

thomas...

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
   with their CakePHP related questions.

   You received this message because you are subscribed to the Google Groups
   CakePHP group.
   To post to this group, send email to cake-php@googlegroups.com
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
more options, visit this group at
  http://groups.google.com/group/cake-php?hl=en

  --
  Mukhamad Ikhsan
  Y!id:ikhsan.onlyhttp://www.diodachi.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-14 Thread AD7six


On 14 dic, 20:55, thomaus tho...@saimiris.com wrote:
 Nobody no clue?

Try using firebug to give you an error message and/or debug the
javascript. If you continue to have problems here's a clue: you have a
(primarily) javascript only question - this isn't a javascript
specific place :)

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-11 Thread thomaus
Nobody no clue?

On Dec 10, 10:04 am, thomaus tho...@saimiris.com wrote:
 Hi John,

 I just did and... still nothing at all when clicking!

 Thanks,

 On Dec 10, 7:20 am, John Andersen j.andersen...@gmail.com wrote:

  Have you added the javascript libraries?
  - prototype
  - scriptaculous

  Enjoy,
     John

  On Dec 9, 9:03 pm, thomaus tho...@saimiris.com wrote:

   Hi John,

   Thanks for helping.

   I actually made a mistake when pasting the code. The original trial
   was

   ?php echo $ajax-submit(__('send', true), array('url'= array
   ('controller'='users', 'action'= 'recoverPassword'), 'class'=
   'button', 'update' = 'messages')); ?

   and the same happens, basically nothing nothing at all when I click on
   the Send button.

   Don't know if it helps but here is the corresponding generated HTML
   code :

   div class=submitinput type=submit url= class=button
   value=Send id=submit116667344 onclick=event.returnValue = false;
   return false; //divscript type=text/javascript
   //![CDATA[
   Event.observe(submit116667344, 'click', function(event) { new
   Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
   {asynchronous:true, evalScripts:true, parameters:Form.serialize
   (Event.element(event).form), requestHeaders:['X-Update',
   'messages']}) }, false);
   //]]
   /script
   /form
   /div

   Thanks,

   On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:

I do observe that your ajax-submit is supposed to call your login
action in your users controller and not your recoverPassword
action!
Please check your code or your statement :)
Enjoy,
   John

On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:

 Hi there,

 I just built an AJAX form and it doesn't work at all!

 My code:

 div id=messages style=display: none
 h3Recover lost password/h3
 pEnter your e-mail address and we will send a reset link to your
 email
 ?php echo $form-create('User'); ?
                         ?php echo $form-input('email', 
 array('label' = __('Your
 Email', true), 'class' = 'text-input')); ?
                         div class=clearbr //div

                         ?php echo $ajax-submit(__('Send', true),
                                                                       
           array('url'= array('controller'='users', 'action'=
 'login'),
                                                                       
           'class'= 'button',
                                                                       
           'update' = 'messages')); ?

 ?php echo $form-end(); ?
 /div !-- End #messages --

 The button appears and when I click on it, absolutely nothing happens
 while if I type myapp/users/recoverPassword in my browser it of course
 calls my controller correctly.

 Thanks in advance,

 thomas...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-11 Thread Mukhamad Ikhsan
do you have a firebug? you can see what the response for XHR request

On Fri, Dec 11, 2009 at 4:57 PM, thomaus tho...@saimiris.com wrote:

 Nobody no clue?

 On Dec 10, 10:04 am, thomaus tho...@saimiris.com wrote:
  Hi John,
 
  I just did and... still nothing at all when clicking!
 
  Thanks,
 
  On Dec 10, 7:20 am, John Andersen j.andersen...@gmail.com wrote:
 
   Have you added the javascript libraries?
   - prototype
   - scriptaculous
 
   Enjoy,
  John
 
   On Dec 9, 9:03 pm, thomaus tho...@saimiris.com wrote:
 
Hi John,
 
Thanks for helping.
 
I actually made a mistake when pasting the code. The original trial
was
 
?php echo $ajax-submit(__('send', true), array('url'= array
('controller'='users', 'action'= 'recoverPassword'), 'class'=
'button', 'update' = 'messages')); ?
 
and the same happens, basically nothing nothing at all when I click
 on
the Send button.
 
Don't know if it helps but here is the corresponding generated HTML
code :
 
div class=submitinput type=submit url= class=button
value=Send id=submit116667344 onclick=event.returnValue = false;
return false; //divscript type=text/javascript
//![CDATA[
Event.observe(submit116667344, 'click', function(event) { new
Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
{asynchronous:true, evalScripts:true, parameters:Form.serialize
(Event.element(event).form), requestHeaders:['X-Update',
'messages']}) }, false);
//]]
/script
/form
/div
 
Thanks,
 
On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:
 
 I do observe that your ajax-submit is supposed to call your
 login
 action in your users controller and not your recoverPassword
 action!
 Please check your code or your statement :)
 Enjoy,
John
 
 On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:
 
  Hi there,
 
  I just built an AJAX form and it doesn't work at all!
 
  My code:
 
  div id=messages style=display: none
  h3Recover lost password/h3
  pEnter your e-mail address and we will send a reset link to
 your
  email
  ?php echo $form-create('User'); ?
  ?php echo $form-input('email',
 array('label' = __('Your
  Email', true), 'class' = 'text-input')); ?
  div class=clearbr //div
 
  ?php echo $ajax-submit(__('Send',
 true),
 
   array('url'= array('controller'='users', 'action'=
  'login'),
 
   'class'= 'button',
 
   'update' = 'messages')); ?
 
  ?php echo $form-end(); ?
  /div !-- End #messages --
 
  The button appears and when I click on it, absolutely nothing
 happens
  while if I type myapp/users/recoverPassword in my browser it of
 course
  calls my controller correctly.
 
  Thanks in advance,
 
  thomas...

 Check out the new CakePHP Questions site http://cakeqs.org and help others
 with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Mukhamad Ikhsan
Y!id:ikhsan.only
http://www.diodachi.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-11 Thread thomaus
No request with Firebug. I don't get it, really...

On Dec 11, 11:04 am, Mukhamad Ikhsan ikhsan.o...@gmail.com wrote:
 do you have a firebug? you can see what the response for XHR request



 On Fri, Dec 11, 2009 at 4:57 PM, thomaus tho...@saimiris.com wrote:
  Nobody no clue?

  On Dec 10, 10:04 am, thomaus tho...@saimiris.com wrote:
   Hi John,

   I just did and... still nothing at all when clicking!

   Thanks,

   On Dec 10, 7:20 am, John Andersen j.andersen...@gmail.com wrote:

Have you added the javascript libraries?
- prototype
- scriptaculous

Enjoy,
   John

On Dec 9, 9:03 pm, thomaus tho...@saimiris.com wrote:

 Hi John,

 Thanks for helping.

 I actually made a mistake when pasting the code. The original trial
 was

 ?php echo $ajax-submit(__('send', true), array('url'= array
 ('controller'='users', 'action'= 'recoverPassword'), 'class'=
 'button', 'update' = 'messages')); ?

 and the same happens, basically nothing nothing at all when I click
  on
 the Send button.

 Don't know if it helps but here is the corresponding generated HTML
 code :

 div class=submitinput type=submit url= class=button
 value=Send id=submit116667344 onclick=event.returnValue = false;
 return false; //divscript type=text/javascript
 //![CDATA[
 Event.observe(submit116667344, 'click', function(event) { new
 Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
 {asynchronous:true, evalScripts:true, parameters:Form.serialize
 (Event.element(event).form), requestHeaders:['X-Update',
 'messages']}) }, false);
 //]]
 /script
 /form
 /div

 Thanks,

 On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:

  I do observe that your ajax-submit is supposed to call your
  login
  action in your users controller and not your recoverPassword
  action!
  Please check your code or your statement :)
  Enjoy,
     John

  On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:

   Hi there,

   I just built an AJAX form and it doesn't work at all!

   My code:

   div id=messages style=display: none
   h3Recover lost password/h3
   pEnter your e-mail address and we will send a reset link to
  your
   email
   ?php echo $form-create('User'); ?
                           ?php echo $form-input('email',
  array('label' = __('Your
   Email', true), 'class' = 'text-input')); ?
                           div class=clearbr //div

                           ?php echo $ajax-submit(__('Send',
  true),

                array('url'= array('controller'='users', 'action'=
   'login'),

                'class'= 'button',

                'update' = 'messages')); ?

   ?php echo $form-end(); ?
   /div !-- End #messages --

   The button appears and when I click on it, absolutely nothing
  happens
   while if I type myapp/users/recoverPassword in my browser it of
  course
   calls my controller correctly.

   Thanks in advance,

   thomas...

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
   more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

 --
 Mukhamad Ikhsan
 Y!id:ikhsan.onlyhttp://www.diodachi.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-10 Thread thomaus
Hi John,

I just did and... still nothing at all when clicking!

Thanks,

On Dec 10, 7:20 am, John Andersen j.andersen...@gmail.com wrote:
 Have you added the javascript libraries?
 - prototype
 - scriptaculous

 Enjoy,
    John

 On Dec 9, 9:03 pm, thomaus tho...@saimiris.com wrote:

  Hi John,

  Thanks for helping.

  I actually made a mistake when pasting the code. The original trial
  was

  ?php echo $ajax-submit(__('send', true), array('url'= array
  ('controller'='users', 'action'= 'recoverPassword'), 'class'=
  'button', 'update' = 'messages')); ?

  and the same happens, basically nothing nothing at all when I click on
  the Send button.

  Don't know if it helps but here is the corresponding generated HTML
  code :

  div class=submitinput type=submit url= class=button
  value=Send id=submit116667344 onclick=event.returnValue = false;
  return false; //divscript type=text/javascript
  //![CDATA[
  Event.observe(submit116667344, 'click', function(event) { new
  Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
  {asynchronous:true, evalScripts:true, parameters:Form.serialize
  (Event.element(event).form), requestHeaders:['X-Update',
  'messages']}) }, false);
  //]]
  /script
  /form
  /div

  Thanks,

  On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:

   I do observe that your ajax-submit is supposed to call your login
   action in your users controller and not your recoverPassword
   action!
   Please check your code or your statement :)
   Enjoy,
      John

   On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:

Hi there,

I just built an AJAX form and it doesn't work at all!

My code:

div id=messages style=display: none
h3Recover lost password/h3
pEnter your e-mail address and we will send a reset link to your
email
?php echo $form-create('User'); ?
                        ?php echo $form-input('email', array('label' 
= __('Your
Email', true), 'class' = 'text-input')); ?
                        div class=clearbr //div

                        ?php echo $ajax-submit(__('Send', true),
                                                                        
        array('url'= array('controller'='users', 'action'=
'login'),
                                                                        
        'class'= 'button',
                                                                        
        'update' = 'messages')); ?

?php echo $form-end(); ?
/div !-- End #messages --

The button appears and when I click on it, absolutely nothing happens
while if I type myapp/users/recoverPassword in my browser it of course
calls my controller correctly.

Thanks in advance,

thomas...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Problem with AJAX submission

2009-12-09 Thread thomaus
Hi there,

I just built an AJAX form and it doesn't work at all!

My code:

div id=messages style=display: none
h3Recover lost password/h3
pEnter your e-mail address and we will send a reset link to your
email
?php echo $form-create('User'); ?
?php echo $form-input('email', array('label' = 
__('Your
Email', true), 'class' = 'text-input')); ?
div class=clearbr //div

?php echo $ajax-submit(__('Send', true),

array('url'= array('controller'='users', 'action'=
'login'),

'class'= 'button',

'update' = 'messages')); ?

?php echo $form-end(); ?
/div !-- End #messages --

The button appears and when I click on it, absolutely nothing happens
while if I type myapp/users/recoverPassword in my browser it of course
calls my controller correctly.

Thanks in advance,

thomas...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-09 Thread John Andersen
I do observe that your ajax-submit is supposed to call your login
action in your users controller and not your recoverPassword
action!
Please check your code or your statement :)
Enjoy,
   John

On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:
 Hi there,

 I just built an AJAX form and it doesn't work at all!

 My code:

 div id=messages style=display: none
 h3Recover lost password/h3
 pEnter your e-mail address and we will send a reset link to your
 email
 ?php echo $form-create('User'); ?
                         ?php echo $form-input('email', array('label' = 
 __('Your
 Email', true), 'class' = 'text-input')); ?
                         div class=clearbr //div

                         ?php echo $ajax-submit(__('Send', true),
                                                                               
   array('url'= array('controller'='users', 'action'=
 'login'),
                                                                               
   'class'= 'button',
                                                                               
   'update' = 'messages')); ?

 ?php echo $form-end(); ?
 /div !-- End #messages --

 The button appears and when I click on it, absolutely nothing happens
 while if I type myapp/users/recoverPassword in my browser it of course
 calls my controller correctly.

 Thanks in advance,

 thomas...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-09 Thread thomaus
Hi John,

Thanks for helping.

I actually made a mistake when pasting the code. The original trial
was

?php echo $ajax-submit(__('send', true), array('url'= array
('controller'='users', 'action'= 'recoverPassword'), 'class'=
'button', 'update' = 'messages')); ?

and the same happens, basically nothing nothing at all when I click on
the Send button.

Don't know if it helps but here is the corresponding generated HTML
code :

div class=submitinput type=submit url= class=button
value=Send id=submit116667344 onclick=event.returnValue = false;
return false; //divscript type=text/javascript
//![CDATA[
Event.observe(submit116667344, 'click', function(event) { new
Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
{asynchronous:true, evalScripts:true, parameters:Form.serialize
(Event.element(event).form), requestHeaders:['X-Update',
'messages']}) }, false);
//]]
/script
/form
/div

Thanks,

On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:
 I do observe that your ajax-submit is supposed to call your login
 action in your users controller and not your recoverPassword
 action!
 Please check your code or your statement :)
 Enjoy,
    John

 On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:

  Hi there,

  I just built an AJAX form and it doesn't work at all!

  My code:

  div id=messages style=display: none
  h3Recover lost password/h3
  pEnter your e-mail address and we will send a reset link to your
  email
  ?php echo $form-create('User'); ?
                          ?php echo $form-input('email', array('label' = 
  __('Your
  Email', true), 'class' = 'text-input')); ?
                          div class=clearbr //div

                          ?php echo $ajax-submit(__('Send', true),
                                                                              
      array('url'= array('controller'='users', 'action'=
  'login'),
                                                                              
      'class'= 'button',
                                                                              
      'update' = 'messages')); ?

  ?php echo $form-end(); ?
  /div !-- End #messages --

  The button appears and when I click on it, absolutely nothing happens
  while if I type myapp/users/recoverPassword in my browser it of course
  calls my controller correctly.

  Thanks in advance,

  thomas...

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Problem with AJAX submission

2009-12-09 Thread John Andersen
Have you added the javascript libraries?
- prototype
- scriptaculous

Enjoy,
   John


On Dec 9, 9:03 pm, thomaus tho...@saimiris.com wrote:
 Hi John,

 Thanks for helping.

 I actually made a mistake when pasting the code. The original trial
 was

 ?php echo $ajax-submit(__('send', true), array('url'= array
 ('controller'='users', 'action'= 'recoverPassword'), 'class'=
 'button', 'update' = 'messages')); ?

 and the same happens, basically nothing nothing at all when I click on
 the Send button.

 Don't know if it helps but here is the corresponding generated HTML
 code :

 div class=submitinput type=submit url= class=button
 value=Send id=submit116667344 onclick=event.returnValue = false;
 return false; //divscript type=text/javascript
 //![CDATA[
 Event.observe(submit116667344, 'click', function(event) { new
 Ajax.Updater('messages','/MyApp/html/users/recoverPassword',
 {asynchronous:true, evalScripts:true, parameters:Form.serialize
 (Event.element(event).form), requestHeaders:['X-Update',
 'messages']}) }, false);
 //]]
 /script
 /form
 /div

 Thanks,

 On Dec 9, 6:42 pm, John Andersen j.andersen...@gmail.com wrote:

  I do observe that your ajax-submit is supposed to call your login
  action in your users controller and not your recoverPassword
  action!
  Please check your code or your statement :)
  Enjoy,
     John

  On Dec 9, 3:03 pm, thomaus tho...@saimiris.com wrote:

   Hi there,

   I just built an AJAX form and it doesn't work at all!

   My code:

   div id=messages style=display: none
   h3Recover lost password/h3
   pEnter your e-mail address and we will send a reset link to your
   email
   ?php echo $form-create('User'); ?
                           ?php echo $form-input('email', array('label' = 
   __('Your
   Email', true), 'class' = 'text-input')); ?
                           div class=clearbr //div

                           ?php echo $ajax-submit(__('Send', true),
                                                                             
         array('url'= array('controller'='users', 'action'=
   'login'),
                                                                             
         'class'= 'button',
                                                                             
         'update' = 'messages')); ?

   ?php echo $form-end(); ?
   /div !-- End #messages --

   The button appears and when I click on it, absolutely nothing happens
   while if I type myapp/users/recoverPassword in my browser it of course
   calls my controller correctly.

   Thanks in advance,

   thomas...



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Problem with AJAX

2009-12-03 Thread SugarCRM Geek
hi all,
am using cake 1.2
   i need a call a function add() in my controller from my index.ctp
page.
the code goes like this
index.ctp
?php echo $ajax-form('add');?
 td width=30%?php echo $form-input
('new_role');?/td
td width=46%?php echo $form-end('Create');?
/td

function in my controller
 function add() {
   echo 'SSS';
Configure::write('debug', '0'); //turn debugging off;
debugging breaks ajax
$this-layout = 'Ajax';
 if (!empty($this-data))
 {
 echo('$this-data');
 $this-Role-create();
 if ($this-Role-save($this-data))
 {
/*$nroles = $this-Role-find('all', array
('conditions' = array('role_name'=$this-data['Role']
['role_name']),'recursive'=-1));
$this-set(compact('nroles'));*/
$this-render('index','ajax');
 } else {
 $this-render('add_failure','ajax');
 }
 }
}



When i click on Create button with some value in the New Role text
box, my URL shows this
?data[Roles]=3_method=POSTdata[new_role]=agrgaqt

if nothing is entered in the Text Box, then i get
?data[Roles]=3_method=POSTdata[new_role]=


This is what i see in the View Page Source,
form id=form141121669 onsubmit=event.returnValue = false; return
false; method=post action=/UOV/access_rules/addfieldset
style=display:none;input type=hidden name=_method
value=POST //fieldsetscript type=text/javascript
//![CDATA[
Event.observe('form141121669', 'submit', function(event) { new
Ajax.Request('/UOV/access_rules/add', {asynchronous:true,
evalScripts:true, parameters:Form.serialize('form141121669')}) },
false);
//]]
/script td width=30%div class=input
textlabel for=new_roleNew Role/labelinput name=data
[new_role] type=text value= id=new_role //div/td
td width=46%div class=submitinput
type=submit value=Create //div/form/td


In my firebug i see an error which says, Registry is not defined.
am using prototype.js
var respondersForEvent = registry.get(eventName); line 4441.

would really appreciate if somebosy threw a little light on this.
thank u :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Speed up load time page problem with Ajax Helper

2009-08-02 Thread Dr. Loboto

No. But load speed problem you can solve by aggressive caching of
static files.

On Aug 1, 8:25 pm, marco.rizze...@gmail.com
marco.rizze...@gmail.com wrote:
 Hi
 I would speed up loading time page so I would create only one
 javascript and load it at the bottom of page.
 Now I have this problem in this only one javascript I have also
 prototype and scriptaculous and in my page I use for example Ajax
 helper but obiusvly I get a javascript error  if I load the javascript
 at bottom of the page.
 I ask if it is possible to continue to use Ajax helper and load the
 javascript at bottom of the page.
 Many Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Speed up load time page problem with Ajax Helper

2009-08-01 Thread marco.rizze...@gmail.com

Hi
I would speed up loading time page so I would create only one
javascript and load it at the bottom of page.
Now I have this problem in this only one javascript I have also
prototype and scriptaculous and in my page I use for example Ajax
helper but obiusvly I get a javascript error  if I load the javascript
at bottom of the page.
I ask if it is possible to continue to use Ajax helper and load the
javascript at bottom of the page.
Many Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with $ajax-link

2009-01-09 Thread Rando

Hello!

I create some ajax link which must load data and then show slide some
div with this content.

Here's my code:

?php
$pid = $project['Project']['id'];
echo $ajax-link('+',
array('controller' = 'tasks', 'action' = 'add', $project
['Project']['id']),
array
(
'complete' =
'
Effect.SlideDown(project-task-$pid);
$(project-plus-$pid).hide();
$(project-minus-$pid).show();
return false;
',
)
);
?

But i have 2 problem.

First, i must use Effect.SlideDown(project-task-$pid); and when i
try write Effect.SlideDown(project-task-$project['Project']['id']);
script give me error. So i use temp field $pid. But it's not good
solution.

Second problem, script doesn't work! But when i change $pid to some
number it's work! I checked $pid and i saw that pid was validate
number. So where is problem?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: - Problem with Ajax and encoding

2008-06-16 Thread Webrickco

Thanks to Spark and AD7six for their kind help. I figured it out (big
part of the problem was in my local httpd.conf file). Let me just make
a summary so that everybody keep in mind when dealing with UTF-8
encoding:

How to display Portuguese encoding or general UTF8 encoding in Cake or
dynamic programming. Check that you have the following elements:

•httpd.conf: AddDefaultCharset UTF-8,

•Files must be saved with UTF-8 format (all your previous special
character are now unreadable and must be rewritten),

•Default.ctp: echo $html-charset('UTF-8'); (equivalent to meta http-
equiv=Content-Type content=text/html; charset=UTF-8 /),

•Headers should also display: html xmlns=http://www.w3.org/1999/
xhtml xml:lang=pt lang=pt dir=ltr

•Database should be configured as utf8_unicode_ci for both tables and
fields.

That should work!

On 15 Jun, 17:56, Webrickco [EMAIL PROTECTED] wrote:
 Thx for your kind answers.

 The point is that everything looks fine locally and when i put
 everything on the server the Ajax request fail to present data
 properly, however requests to the database and HTML presentation
 continue to work fine in ISO-8859-1, and unfortunately not in UTF-8.

 I would believe this is a server configuration issue and will follow
 your recommendation on that matter.

 On 15 Jun, 15:49, Spark [EMAIL PROTECTED] wrote:



  database default collation is just a little part, and doesn't matter
  as much as you may think.
  database connection is far more important (you can change it in
  config/database.php), the file you are editing is, i'm almost for
  sure, wrongly encoded. Try To change it in Aptana or Eclipse (under
  the 'edit' menu, there's a 'set encoding' option. It's the most common
  mistake when dealing with utf8. Another sensitive part is the *server*
  configurations for sending text/html. Some of very old or badly
  configured servers lack the possibility to send it in utf8, therefore,
  breaking the path between cake and the browser.

  This is *the* article to read. It helped me a thousand times when
  dealing with 'i dont need to know this' 
  programmers:http://www.joelonsoftware.com/articles/Unicode.html

  Spark

  On Sun, Jun 15, 2008 at 6:33 AM, Webrickco [EMAIL PROTECTED] wrote:

   Hi, I have a problem figuring out why the result of an Ajax execution
   is not in the correct encoding under cake.

   You can see the result athttp://webrickco.com/caketest. Using the
   user/password david/test and clicking on the first link: Alterar a
   configuração dos menus. At this point the result of the consultation
   to the database is correctly displayed as well as all other
   accentuated text in the page, but if I click on a tick button (calls
   an Ajax function to copy the values to the edit fields and refreshes
   the item list), the refresh of the DIV is compromised. How do i do to
   keep the correct encoding after I fire an Ajax function?

   Some data on the site:
   Default.ctp: $html-charset('ISO-8859-1');

   Ajax function triggered as follow:
   echo td.$ajax-submit('tick.png', array('update' = 'tabela',
   'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
   $menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
   ['link']))./td;

   Database fields and tables are kept in utf8_general_ci encoding by
   default

   Thx for your help.

  --
  [livesets]http://djspark.com.br/
  [web]http://sydi.net
  [filmes]http://melhoresfilmes.com.br- Ocultar texto citado -

 - Mostrar texto citado -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



[Cake 1.2. RC1] - Problem with Ajax and encoding

2008-06-15 Thread Webrickco

Hi, I have a problem figuring out why the result of an Ajax execution
is not in the correct encoding under cake.

You can see the result at http://webrickco.com/caketest. Using the
user/password david/test and clicking on the first link: Alterar a
configuração dos menus. At this point the result of the consultation
to the database is correctly displayed as well as all other
accentuated text in the page, but if I click on a tick button (calls
an Ajax function to copy the values to the edit fields and refreshes
the item list), the refresh of the DIV is compromised. How do i do to
keep the correct encoding after I fire an Ajax function?

Some data on the site:
Default.ctp: $html-charset('ISO-8859-1');

Ajax function triggered as follow:
echo td.$ajax-submit('tick.png', array('update' = 'tabela',
'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
$menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
['link']))./td;

Database fields and tables are kept in utf8_general_ci encoding by
default

Thx for your help.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cake 1.2. RC1 - Problem with Ajax and encoding

2008-06-15 Thread Webrickco

Hi,

I have a test page made with cake 1.2 RC1 and everything is fine
despite the lack of documentation on the matter. I have however a
little problem on my production site that doesn't happen on local. The
problem is with encoding. Everything looks fine until i fire an event
calling Ajax and returning a result refreshing a DIV. At that point,
the DIV gets a bad encoding. Why is that?

You can see the result at http://www.webrickco.com/caketest.
User/password: david/test
First option: Alterar a configuração dos menus
Then just click on a Tick to see how the list will be messed up.

Some more data:
Default.ctp: $html-charset('ISO-8859-1');

Database codepage: utf8_general_ci

Ajax call:
echo td.$ajax-submit('tick.png', array('update' = 'tabela',
'loaded' = 'Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
$menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
['link']))./td;

Thanks in advance. Your help is much appreciated.
David

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: - Problem with Ajax and encoding

2008-06-15 Thread AD7six



On Jun 15, 11:33 am, Webrickco [EMAIL PROTECTED] wrote:
 Hi, I have a problem figuring out why the result of an Ajax execution
 is not in the correct encoding under cake.

because you are not using UTF-8, ajax requests always use and expect
UTF-8.

 You can see the result athttp://webrickco.com/caketest. Using the
 user/password david/test and clicking on the first link: Alterar a
 configuração dos menus. At this point the result of the consultation
 to the database is correctly displayed as well as all other
 accentuated text in the page, but if I click on a tick button (calls
 an Ajax function to copy the values to the edit fields and refreshes
 the item list), the refresh of the DIV is compromised. How do i do to
 keep the correct encoding after I fire an Ajax function?

By making everything UTF-8.

 Some data on the site:
 Default.ctp: $html-charset('ISO-8859-1');

Why.

 Ajax function triggered as follow:
 echo td.$ajax-submit('tick.png', array('update' = 'tabela',
 'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
 $menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
 ['link']))./td;

 Database fields and tables are kept in utf8_general_ci encoding by
 default

Double why (are you mixing encodings - that's a recipe for disaster)

For info:
http://groups.google.com/group/cake-php/browse_thread/thread/28f129e2d31ea263/c64b63942d68cc87?lnk=gstq=pr%3Fblems#c64b63942d68cc87


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake 1.2. RC1 - Problem with Ajax and encoding

2008-06-15 Thread AD7six



On Jun 15, 12:13 pm, Webrickco [EMAIL PROTECTED] wrote:
 Hi,

 I have a test page made with cake 1.2 RC1 and everything is fine
 despite the lack of documentation on the matter.

book.cakephp.org

 I have however a
 little problem on my production site that doesn't happen on local. The
 problem is with encoding. Everything looks fine until i fire an event
 calling Ajax and returning a result refreshing a DIV. At that point,
 the DIV gets a bad encoding. Why is that?

No double posting please.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: - Problem with Ajax and encoding

2008-06-15 Thread Webrickco

Thank for your answer. I was expecting you say something like this.
Obviously i tryed UTF-8 as first place along with many other
configuration of charset. Unfortunately, if i put $html-
charset('UTF-8'); you can look at the result now at 
http://www.webrickco.com/caketest

It's even worse!!! This time, no encoding is working: html, database
and sure Ajax requests...


On 15 Jun, 12:26, AD7six [EMAIL PROTECTED] wrote:
 On Jun 15, 11:33 am, Webrickco [EMAIL PROTECTED] wrote:

  Hi, I have a problem figuring out why the result of an Ajax execution
  is not in the correct encoding under cake.

 because you are not using UTF-8, ajax requests always use and expect
 UTF-8.

  You can see the result athttp://webrickco.com/caketest. Using the
  user/password david/test and clicking on the first link: Alterar a
  configuração dos menus. At this point the result of the consultation
  to the database is correctly displayed as well as all other
  accentuated text in the page, but if I click on a tick button (calls
  an Ajax function to copy the values to the edit fields and refreshes
  the item list), the refresh of the DIV is compromised. How do i do to
  keep the correct encoding after I fire an Ajax function?

 By making everything UTF-8.

  Some data on the site:
  Default.ctp: $html-charset('ISO-8859-1');

 Why.

  Ajax function triggered as follow:
  echo td.$ajax-submit('tick.png', array('update' = 'tabela',
  'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
  $menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
  ['link']))./td;

  Database fields and tables are kept in utf8_general_ci encoding by
  default

 Double why (are you mixing encodings - that's a recipe for disaster)

 For 
 info:http://groups.google.com/group/cake-php/browse_thread/thread/28f129e2...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: - Problem with Ajax and encoding

2008-06-15 Thread AD7six



On Jun 15, 3:20 pm, Webrickco [EMAIL PROTECTED] wrote:
 Thank for your answer. I was expecting you say something like this.
 Obviously i tryed UTF-8 as first place along with many other
 configuration of charset. Unfortunately, if i put $html-

 charset('UTF-8'); you can look at the result now 
 athttp://www.webrickco.com/caketest

It's a bit pointless changing the charset tag if what you are sending
doesn't match it.

If the text Página para testar os ãõíúáéç comes from a view file -
your view files are ISO-8859-1 encoded.

You need to check
 the encoding of your view files
 your db connection encoding
 your db table encoding
 your meta tag

You should delete anything put in the db with your 'exotic' charset
setup because it will give you pr?blems.

And if you are still getting pr?blems there are 2 possibilities
 You still have something to check/correct
 See point one.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: [Cake 1.2. RC1] - Problem with Ajax and encoding

2008-06-15 Thread Spark

database default collation is just a little part, and doesn't matter
as much as you may think.
database connection is far more important (you can change it in
config/database.php), the file you are editing is, i'm almost for
sure, wrongly encoded. Try To change it in Aptana or Eclipse (under
the 'edit' menu, there's a 'set encoding' option. It's the most common
mistake when dealing with utf8. Another sensitive part is the *server*
configurations for sending text/html. Some of very old or badly
configured servers lack the possibility to send it in utf8, therefore,
breaking the path between cake and the browser.

This is *the* article to read. It helped me a thousand times when
dealing with 'i dont need to know this' programmers:
http://www.joelonsoftware.com/articles/Unicode.html

Spark

On Sun, Jun 15, 2008 at 6:33 AM, Webrickco [EMAIL PROTECTED] wrote:

 Hi, I have a problem figuring out why the result of an Ajax execution
 is not in the correct encoding under cake.

 You can see the result at http://webrickco.com/caketest. Using the
 user/password david/test and clicking on the first link: Alterar a
 configuração dos menus. At this point the result of the consultation
 to the database is correctly displayed as well as all other
 accentuated text in the page, but if I click on a tick button (calls
 an Ajax function to copy the values to the edit fields and refreshes
 the item list), the refresh of the DIV is compromised. How do i do to
 keep the correct encoding after I fire an Ajax function?

 Some data on the site:
 Default.ctp: $html-charset('ISO-8859-1');

 Ajax function triggered as follow:
 echo td.$ajax-submit('tick.png', array('update' = 'tabela',
 'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
 $menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
 ['link']))./td;

 Database fields and tables are kept in utf8_general_ci encoding by
 default

 Thx for your help.

 




-- 
[livesets] http://djspark.com.br/
[web] http://sydi.net
[filmes] http://melhoresfilmes.com.br

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: - Problem with Ajax and encoding

2008-06-15 Thread Webrickco

Thx for your kind answers.

The point is that everything looks fine locally and when i put
everything on the server the Ajax request fail to present data
properly, however requests to the database and HTML presentation
continue to work fine in ISO-8859-1, and unfortunately not in UTF-8.

I would believe this is a server configuration issue and will follow
your recommendation on that matter.

On 15 Jun, 15:49, Spark [EMAIL PROTECTED] wrote:
 database default collation is just a little part, and doesn't matter
 as much as you may think.
 database connection is far more important (you can change it in
 config/database.php), the file you are editing is, i'm almost for
 sure, wrongly encoded. Try To change it in Aptana or Eclipse (under
 the 'edit' menu, there's a 'set encoding' option. It's the most common
 mistake when dealing with utf8. Another sensitive part is the *server*
 configurations for sending text/html. Some of very old or badly
 configured servers lack the possibility to send it in utf8, therefore,
 breaking the path between cake and the browser.

 This is *the* article to read. It helped me a thousand times when
 dealing with 'i dont need to know this' 
 programmers:http://www.joelonsoftware.com/articles/Unicode.html

 Spark



 On Sun, Jun 15, 2008 at 6:33 AM, Webrickco [EMAIL PROTECTED] wrote:

  Hi, I have a problem figuring out why the result of an Ajax execution
  is not in the correct encoding under cake.

  You can see the result athttp://webrickco.com/caketest. Using the
  user/password david/test and clicking on the first link: Alterar a
  configuração dos menus. At this point the result of the consultation
  to the database is correctly displayed as well as all other
  accentuated text in the page, but if I click on a tick button (calls
  an Ajax function to copy the values to the edit fields and refreshes
  the item list), the refresh of the DIV is compromised. How do i do to
  keep the correct encoding after I fire an Ajax function?

  Some data on the site:
  Default.ctp: $html-charset('ISO-8859-1');

  Ajax function triggered as follow:
  echo td.$ajax-submit('tick.png', array('update' = 'tabela',
  'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'.
  $menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu']
  ['link']))./td;

  Database fields and tables are kept in utf8_general_ci encoding by
  default

  Thx for your help.

 --
 [livesets]http://djspark.com.br/
 [web]http://sydi.net
 [filmes]http://melhoresfilmes.com.br

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with ajax

2008-04-23 Thread mkaelkael

hello,
I have  this js

function updateopt(id){

id= document.getElementById(id).innerthHTML;

new Ajax.Updater('div2', '/listlevel.thtml', { parameters: { id:
id }});
}

listlevel.thtml is a views and in the same directory than the
index.thml

index.thtml

h1Secteur/h1



?php
echo $ajax-div('div1');
echo $html-link(Ajouter un secteur, /sectors/add);
$i=0;
   echoselect size='10';
   foreach($sector as $sectors):
 $id=name.$i;
echooption id=.$id. onclick=updateopt('.$id.');.
$sectors['Sector']['name']./option;
$i++;
endforeach;
echo '/select';
echo $ajax-divEnd('div1');
echo $ajax-div('div2');
echo $ajax-divEnd('div2');
?

error onclick event :

Object not found!

The requested URL was not found on this server. The link on the
referring page seems to be wrong or outdated. Please inform the author
of that page about the error.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
04/23/08 16:11:12
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g
mod_autoindex_color PHP/5.2.5

Prehaps /listlevel.thtml isn't found

ANYBODY can help me

Thanks you

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with ajax

2008-04-23 Thread Davide

mkaelkael wrote:
 ...

 listlevel.thtml is a views and in the same directory than the
 index.thml

Don't know if it's right to refer directly to a thtml file, but try remove
the initial slash from /listlevel.. so linking to listlevel...

Bye
Davide

-- 
Live life like you're gonna die. Because you're gonna.
William Shatner


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with $ajax-submit

2008-04-18 Thread MB

Here is my submit button --

print $ajax-submit('Save', array('url' = '/klasses/addlink',
'loaded'='closesubject()'));

The save works but the 'closesubject()' function which is a javascript
doesnt ever seem to get called.

Here is the javascript:

script type=text/javascript language=JavaScript
function closesubject(form)
{
window.opener.parent.location.reload();
window.close();
return false;
}
/script

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with $ajax-submit

2008-04-18 Thread b logica

Are you sure that 'loaded' is appropriate? Are you loading anything
into the page? Try 'success' instead.

On Fri, Apr 18, 2008 at 9:55 PM, MB [EMAIL PROTECTED] wrote:

  Here is my submit button --

  print $ajax-submit('Save', array('url' = '/klasses/addlink',
  'loaded'='closesubject()'));

  The save works but the 'closesubject()' function which is a javascript
  doesnt ever seem to get called.

  Here is the javascript:

  script type=text/javascript language=JavaScript
  function closesubject(form)
  {
 window.opener.parent.location.reload();
 window.close();
 return false;
  }
  /script

  


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with AJAX form

2008-03-03 Thread iperich

Hi gurus, I have the following issue: I have a form that works ok
processing /comments/add this way: form action=?php echo $html-
url('/comments/add'); ? method=post. it works ok, but when i
want to do the same with ajax, I do echo $ajax-form(array('action' =
'/comments/add'), 'post', array('update' = 'comments')); the
comments div is updated but the form data is not passed to the 'add'
function, and the add function response is no data. The textarea
(tinymce) keeps the info i put on. If I click the submit button again,
then the form is processed ok...

i'm confused... help.!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Ajax: observeField

2007-07-06 Thread minglee

I solved the problem. Use magic '$' function, and avoid using ajax to
create the field.

On Jul 5, 11:28 am, minglee [EMAIL PROTECTED] wrote:
 I use $Ajax-observeField, with Option['with'='type_id'], however, an
 error reported:
 Form.Element.Serializers[method] is not a function.
 But from the manual, to use Option['with'] of phpCake Ajax, only need
 to call by DOM ID, and in my case 'type_id' is.
 What is the problem?
 By the way, where can I find examples for using Cake's Ajax Helper? I
 think there should some usage examples in Cake's manual.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with Ajax: observeField

2007-07-04 Thread minglee

I use $Ajax-observeField, with Option['with'='type_id'], however, an
error reported:
Form.Element.Serializers[method] is not a function.
But from the manual, to use Option['with'] of phpCake Ajax, only need
to call by DOM ID, and in my case 'type_id' is.
What is the problem?
By the way, where can I find examples for using Cake's Ajax Helper? I
think there should some usage examples in Cake's manual.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



paginator-numbers - problem with ajax ...

2007-06-24 Thread puatki

Hello ... ;)

I have problem with $paginator-numbers.
When I execute code:

$paginator-sort('TOPIC', 'topic', array('url'=
array('controller'='Projects', 'action'='sort'),'update'='list'));
everything works ok and my site use ajax.

When I try do the same with $paginator-numbers

echo $paginator-numbers(array('url'= array('controller'='Projects',
'action'='sort'),'update'='list'));

I get a href=/fw/projects/index/page:1/url:Array/update:list 1/a
instead of sth like:

( ... ) script type=text/
javascriptEvent.observe('link1213858332' ( ... )

there is no java script. :(

Can You help me ?
Sorry for my english ;D


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: paginator-numbers - problem with ajax ...

2007-06-24 Thread Mariano Iglesias

Please ticket this:

https://trac.cakephp.org

Thanks!

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de puatki
Enviado el: Domingo, 24 de Junio de 2007 10:22 a.m.
Para: Cake PHP
Asunto: paginator-numbers - problem with ajax ...

echo $paginator-numbers(array('url'= array('controller'='Projects',
'action'='sort'),'update'='list'));

I get a href=/fw/projects/index/page:1/url:Array/update:list 1/a


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Ajax Chat and hosting

2007-04-26 Thread MattC

Hey jaimeed,
I wrote the ajax chat plugin.  You definitely don't need to do
anything special on the server side.  The error makes me think the url
is wrong.  I run all of my sites from the root domain so the path is
always /chat/update.  I would guess the problem is either the extra /
cake directory level or some sort of weird namespace conflict with
your  chat_id ('chat').

-Matt

On Apr 24, 7:37 pm, jaimeed [EMAIL PROTECTED] wrote:
 Hi folks!

 I have downloaded the ajax chat plugin and execute it in my site...In
 localhost it works perfectly but, when I upload it to the hosting I
 get this error:

 Forbidden
 You don't have permission to access /cake/chat/update/chat on this
 server.

 Additionally, a 404 Not Found error was encountered while trying to
 use an ErrorDocument to handle the request.

 The chat controller has the right permissions. I tried to delete the
 chat controller from the hosting and the same error!, I tried to type
 the url calling this controller and this time the error didn't appear,
 just the message No messages.

 The question is ¿the server needs a special configuration for run this
 plugin?

 Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Ajax Chat and hosting

2007-04-26 Thread jaimeed

Hi MattC.

Thanks for your answer.

I changed the url, and I tried another chat_id, but I get the same
mistake...,, I have a question, I can't to enable the mod_rewrite in
the webserver, and also I can't to change the httpd.conf for the
production setup...maybe it causes the problem?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with Ajax Chat and hosting

2007-04-24 Thread jaimeed

Hi folks!

I have downloaded the ajax chat plugin and ran it in my site...In
localhost it works perfectly but, when I upload it to the hosting I
get this error:

Forbidden
You don't have permission to access /cake/chat/update/chat71 on this
server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.

The chat controller has the right permissions. I tried to delete the
chat controller from the hosting and the same error!, I tried to type
the url calling this controller and this time the error didn't appear,
just the message No messages.

The question is ¿the server needs an especial configuration for run
this plugin?

Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with Ajax Chat and hosting

2007-04-24 Thread jaimeed

Hi folks!

I have downloaded the ajax chat plugin and execute it in my site...In
localhost it works perfectly but, when I upload it to the hosting I
get this error:

Forbidden
You don't have permission to access /cake/chat/update/chat on this
server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.

The chat controller has the right permissions. I tried to delete the
chat controller from the hosting and the same error!, I tried to type
the url calling this controller and this time the error didn't appear,
just the message No messages.

The question is ¿the server needs a special configuration for run this
plugin?

Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: newbie problem cakePHP/Ajax

2007-03-16 Thread Mike Griffin

On 3/5/07, Bart op de grote markt [EMAIL PROTECTED] wrote:
 I checked and in the taskscontroller I find:
 var $helpers = array('Html', 'Javascript', 'Ajax');
 So it must be another problem, though the $html variable seems to
 work...

Hi.

Not sure if you managed to fix this problem yet, but what I found was
that I needed to add the following line after the link to
scriptaculous:
?php print $javascript-link('controls.js') ?

After this, all the javascript errors just melted away and it all worked.

Mike.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: newbie problem cakePHP/Ajax

2007-03-16 Thread Bart op de grote markt

 Hi.

 Not sure if you managed to fix this problem yet, but what I found was
 that I needed to add the following line after the link to
 scriptaculous:
 ?php print $javascript-link('controls.js') ?

 After this, all the javascript errors just melted away and it all worked.

 Mike.

Hey thanks for that solution :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: newbie problem cakePHP/Ajax

2007-03-05 Thread Bart op de grote markt

Hello,

I checked and in the taskscontroller I find:
var $helpers = array('Html', 'Javascript', 'Ajax');
So it must be another problem, though the $html variable seems to
work...

This is the line (35) to which the error refers (see my first post).
It's indeed the first place where the $javascript variable is
called...

34   ?php print $html-charsetTag('UTF-8') ?
35   ?php print $javascript-link('prototype') ?
36   ?php print $javascript-link('scriptaculous.js?load=effects') ?


grtz,

Bart


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



newbie problem cakePHP/Ajax

2007-03-01 Thread Bart op de grote markt

Hello,

I just installed WAMP-server (Apache/Php/Mysql) and cakePHP.  I'm
seeing the startpage that is mentioned on the cakePHP-site and the
database-connection is also right.
Now I was looking for some tutorials and I found this one:
http://grahambird.co.uk/cake/tutorials/ajax.php.
One of the steps is to the following:

 Upload script.aculo.us files

Place the script.aculo.us files in the /app/webroot/js/ folder. Don't
forget to put the prototype.js file (that comes with the
script.aculo.us library) in the same folder.

To make the JavaScript libraries available to Cake, you also need to
add the following inside the head tag of your Layout file (/app/
views/layouts/default.thtml):

?php print $html-charsetTag('UTF-8') ?
?php print $javascript-link('prototype') ?
?php print $javascript-link('scriptaculous.js?load=effects') ?

Note: The Ajax functions only work with the UTF-8 character set
declaration.

If you have not created a layout file (ie the /app/views/layouts/
folder is empty), you can add these lines to the default Cake layout
(in /cake/libs/views/templates/layouts/).



I did everything as mentioned, but now I get the following error when
I execute http://localhost/; or http://localhost/tasks:




Notice: Undefined variable: javascript in C:\wamp\www\cake\libs\view
\templates\layouts\default.thtml on line 35

Fatal error: Call to a member function link() on a non-object in C:
\wamp\www\cake\libs\view\templates\layouts\default.thtml on line 35



So a problem with $javascript. Since I don't know what the framework
exactly does, I have now idea what to do.  The variable $html doesn't
seem to give a problem.  I could see in the sourcecode that the
charset was set to UTF-8, quite spectacular :-).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: newbie problem cakePHP/Ajax

2007-03-01 Thread Langdon Stevenson

Hi Bart

It's hard to know what the problem is, but my guess would be that the 
javascript file/s are not being loaded.  It would help if you posted the 
page source so that we can see what is on line 35, and what the link 
tags are outputting.

Regards,
Langdon


 I did everything as mentioned, but now I get the following error when
 I execute http://localhost/; or http://localhost/tasks:
 
 
 
 
 Notice: Undefined variable: javascript in C:\wamp\www\cake\libs\view
 \templates\layouts\default.thtml on line 35
 
 Fatal error: Call to a member function link() on a non-object in C:
 \wamp\www\cake\libs\view\templates\layouts\default.thtml on line 35
 
 
 So a problem with $javascript. Since I don't know what the framework
 exactly does, I have now idea what to do.  The variable $html doesn't
 seem to give a problem.  I could see in the sourcecode that the
 charset was set to UTF-8, quite spectacular :-).

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: newbie problem cakePHP/Ajax

2007-03-01 Thread John David Anderson (_psychic_)


On Mar 1, 2007, at 2:12 PM, Langdon Stevenson wrote:


 Hi Bart

 It's hard to know what the problem is, but my guess would be that the
 javascript file/s are not being loaded.  It would help if you  
 posted the
 page source so that we can see what is on line 35, and what the link
 tags are outputting.

I'd guess that the controller rendering the view doesn't have the  
JavascriptHelper available.

var $helpers = array('Html', 'Javascript');

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---