Error: JsHelper could not be found. CakePHP3

2014-08-27 Thread Jipson Thomas
Hi,
Is there any alternative for JS helper in cakephp 3? I tried to integrate 
tinymceditor to my cakephp 3 website based on the tutorial on 
http://bakery.cakephp.org/articles/galitul/2012/04/11/helper_tinymce_for_cakephp_2.
When I am accessing the form , I get the following error.
*Error: * *JsHelper* could not be found.
*Error: * Create the class *JsHelper* below in file: 
src/View/Helper/JsHelper.php

Would you please help me to fix this?
Regards,
Jipson

-- 
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/d/optout.


Re: Error: JsHelper could not be found. CakePHP3

2014-08-27 Thread José Lorenzo
Seems like someone converted it into a plugin:

https://github.com/oldskool/cakephp-js

On Wednesday, August 27, 2014 3:59:29 PM UTC+2, Jipson Thomas wrote:

 Hi,
 Is there any alternative for JS helper in cakephp 3? I tried to integrate 
 tinymceditor to my cakephp 3 website based on the tutorial on 
 http://bakery.cakephp.org/articles/galitul/2012/04/11/helper_tinymce_for_cakephp_2
 .
 When I am accessing the form , I get the following error.
 *Error: * *JsHelper* could not be found.
 *Error: * Create the class *JsHelper* below in file: 
 src/View/Helper/JsHelper.php

 Would you please help me to fix this?
 Regards,
 Jipson


-- 
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/d/optout.


Re: Error: JsHelper could not be found. CakePHP3

2014-08-27 Thread Jipson Thomas
HI Jose,
Thank you.
Regards,
Jipson

On Wednesday, 27 August 2014 14:59:29 UTC+1, Jipson Thomas wrote:

 Hi,
 Is there any alternative for JS helper in cakephp 3? I tried to integrate 
 tinymceditor to my cakephp 3 website based on the tutorial on 
 http://bakery.cakephp.org/articles/galitul/2012/04/11/helper_tinymce_for_cakephp_2
 .
 When I am accessing the form , I get the following error.
 *Error: * *JsHelper* could not be found.
 *Error: * Create the class *JsHelper* below in file: 
 src/View/Helper/JsHelper.php

 Would you please help me to fix this?
 Regards,
 Jipson


-- 
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/d/optout.


Re: Can one use jquery instead of JsHelper?

2013-09-07 Thread ravage1984
Guys, keep in mind that in CakePHP 3.0 there will be no JSHelper.

https://github.com/cakephp/cakephp/pull/1012

So I personally recommend to not rely on it, if you can.

Sam, if you just started to use CakePHP and have not implemented JSHelper 
yet, don't start with it.
There's not much advantage over it except for convenience.

You still can write performant  clean jquery code in combination with 
CakePHP without using JSHelper.

Greetings from Switzerland
Marc

Am Freitag, 6. September 2013 09:08:38 UTC+2 schrieb Simon Males:

 Yes you can. 

 JsHelper is just a shortcut to a few jQuery methods. 

 In particular I believe it's a convenient tool if you use jQuery UI. 

 On Fri, Sep 6, 2013 at 2:32 PM, Sam light...@gmail.com javascript: 
 wrote: 
  Dear CakePHP experts, 
  
  I would like to use CakePHP and jQuery. There are sample source code 
  available with jQuery that I would like to use. But when I read CakePHP 
  documentation, the code with JsHelper is different from jQuery. Can I 
 simply 
  use jQuery and not JsHelper in CakePHP? 
  
  May I ask those who have used JsHelper, what are the advantages of 
 JsHelper 
  over jQuery? 
  
  Thank you. 
  
  -- 
  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+u...@googlegroups.com javascript:. 
  To post to this group, send email to cake...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/cake-php. 
  For more options, visit https://groups.google.com/groups/opt_out. 



 -- 
 Simon Males 


-- 
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: Can one use jquery instead of JsHelper?

2013-09-07 Thread Sam
Anyone knows why JSHelper will be removed in CakePHP 3.0? What is bad about 
it that caused it to be removed?

On Saturday, September 7, 2013 9:25:36 PM UTC+8, ravag...@gmail.com wrote:

 Guys, keep in mind that in CakePHP 3.0 there will be no JSHelper.

 https://github.com/cakephp/cakephp/pull/1012

 So I personally recommend to not rely on it, if you can.

 Sam, if you just started to use CakePHP and have not implemented JSHelper 
 yet, don't start with it.
 There's not much advantage over it except for convenience.

 You still can write performant  clean jquery code in combination with 
 CakePHP without using JSHelper.

 Greetings from Switzerland
 Marc

 Am Freitag, 6. September 2013 09:08:38 UTC+2 schrieb Simon Males:

 Yes you can. 

 JsHelper is just a shortcut to a few jQuery methods. 

 In particular I believe it's a convenient tool if you use jQuery UI. 

 On Fri, Sep 6, 2013 at 2:32 PM, Sam light...@gmail.com wrote: 
  Dear CakePHP experts, 
  
  I would like to use CakePHP and jQuery. There are sample source code 
  available with jQuery that I would like to use. But when I read CakePHP 
  documentation, the code with JsHelper is different from jQuery. Can I 
 simply 
  use jQuery and not JsHelper in CakePHP? 
  
  May I ask those who have used JsHelper, what are the advantages of 
 JsHelper 
  over jQuery? 
  
  Thank you. 
  
  -- 
  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+u...@googlegroups.com. 
  To post to this group, send email to cake...@googlegroups.com. 
  Visit this group at http://groups.google.com/group/cake-php. 
  For more options, visit https://groups.google.com/groups/opt_out. 



 -- 
 Simon Males 



-- 
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: Can one use jquery instead of JsHelper?

2013-09-07 Thread ravage1984
https://groups.google.com/forum/#!searchin/cakephp-core/jshelper/cakephp-core/UaXqk_rTdxE/AaznyE_XG1gJ

Am Samstag, 7. September 2013 15:49:13 UTC+2 schrieb Sam:

 Anyone knows why JSHelper will be removed in CakePHP 3.0? What is bad 
 about it that caused it to be removed?

 On Saturday, September 7, 2013 9:25:36 PM UTC+8, ravag...@gmail.com wrote:

 Guys, keep in mind that in CakePHP 3.0 there will be no JSHelper.

 https://github.com/cakephp/cakephp/pull/1012

 So I personally recommend to not rely on it, if you can.

 Sam, if you just started to use CakePHP and have not implemented JSHelper 
 yet, don't start with it.
 There's not much advantage over it except for convenience.

 You still can write performant  clean jquery code in combination with 
 CakePHP without using JSHelper.

 Greetings from Switzerland
 Marc

 Am Freitag, 6. September 2013 09:08:38 UTC+2 schrieb Simon Males:

 Yes you can. 

 JsHelper is just a shortcut to a few jQuery methods. 

 In particular I believe it's a convenient tool if you use jQuery UI. 

 On Fri, Sep 6, 2013 at 2:32 PM, Sam light...@gmail.com wrote: 
  Dear CakePHP experts, 
  
  I would like to use CakePHP and jQuery. There are sample source code 
  available with jQuery that I would like to use. But when I read 
 CakePHP 
  documentation, the code with JsHelper is different from jQuery. Can I 
 simply 
  use jQuery and not JsHelper in CakePHP? 
  
  May I ask those who have used JsHelper, what are the advantages of 
 JsHelper 
  over jQuery? 
  
  Thank you. 
  
  -- 
  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+u...@googlegroups.com. 
  To post to this group, send email to cake...@googlegroups.com. 
  Visit this group at http://groups.google.com/group/cake-php. 
  For more options, visit https://groups.google.com/groups/opt_out. 



 -- 
 Simon Males 



-- 
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.


Can one use jquery instead of JsHelper?

2013-09-06 Thread Sam
Dear CakePHP experts,

I would like to use CakePHP and jQuery. There are sample source code 
available with jQuery that I would like to use. But when I read CakePHP 
documentation, the code with JsHelper is different from jQuery. Can I 
simply use jQuery and not JsHelper in CakePHP? 

May I ask those who have used JsHelper, what are the advantages of JsHelper 
over jQuery?

Thank you.

-- 
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: Can one use jquery instead of JsHelper?

2013-09-06 Thread Simon Males
Yes you can.

JsHelper is just a shortcut to a few jQuery methods.

In particular I believe it's a convenient tool if you use jQuery UI.

On Fri, Sep 6, 2013 at 2:32 PM, Sam lightai...@gmail.com wrote:
 Dear CakePHP experts,

 I would like to use CakePHP and jQuery. There are sample source code
 available with jQuery that I would like to use. But when I read CakePHP
 documentation, the code with JsHelper is different from jQuery. Can I simply
 use jQuery and not JsHelper in CakePHP?

 May I ask those who have used JsHelper, what are the advantages of JsHelper
 over jQuery?

 Thank you.

 --
 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.



-- 
Simon Males

-- 
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.


CakePHP, Google Charts Plugin and JsHelper

2013-05-28 Thread Ana Mendes


i wish select an element of dropdownlist (choose a Project) and with 
JSHELPER (ajax) update the GRAPH that show statistics of this Project.

I can choose the Project and through the 'POST' I can generate the array 
graph, but i cannot show the GRAPH. I tested without JSHELPER and show my 
Graph.

MY VIEW CODE:

bESCOLHA O PROJETO: /b 
?php
echo $this-Form-select('projects', array($projects), array('multiple' = 
false,
'class' = 'span2',
'id' = 'projectsTest'));
?
/br

 div id=chart_div  

  /div

?php
$this-Js-get('#projectsTest')-event('change', $this-Js-request(array(
'controller' = 'Registos',
'action' = 'timePerProjectIssueTypeChart'
), array(
'update' = '#chart_div',
'async' = true,
'method' = 'post',
'dataExpression' = true,
'data' = $this-Js-serializeForm(array(
'isForm' = true,
'inline' = true
);

? MY VIEW TIME_PER_PROJECT_ISSUE_TYPE_CHART

div id=chart_div  ?php

echo 
$this-GoogleChart-createJsChart($timePerProjectIssueTypeChart);
?
/div

I do not put the code of the controllers, because individually tested and 
are working.

Thanks

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Using .replaceWith() or .attr() in JsHelper::link ?

2012-12-04 Thread Salines
Hi,
I have a probably trivial question.

Can I put in cakephp JsHelper :: link options
other jQuery method, for example. replaceWith ()?

Clarification, on the admin page I have more links (twitter bootstrap 
buttons) on each individual record, one of the buttons should change when 
clicked.

Eg I need to change the following links

from

a href=/admin/posts/publish/17/1 class=btn btn-warning id=17
i class=icon-ban-circle / i
/ a


to

a href=/admin/posts/publish/17/0 class=btn btn-success id=17
i class=icon-ok-circle / i
/ a


With JsHelper :: link, 'update' option we can change the contents inside 
a / a tags, in this case it's i / i tags.

My JsHelper link:

?php
echo $this-Js-link(
$this-Html-tag('i', '', array('class' = 'icon-ban-circle')), 
array(
'action' = 'publish',
$post['Post']['id'],
'1'),
array(
'class' = 'btn btn-warning',
'id' = $post['Post']['id'],
'update' = '#' . $post['Post']['id'],
'escape' = false),
false);
?

http://pastebin.com/uDMjqdpN 

Thanks

-- 
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 post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Using .replaceWith() or .attr() in JsHelper::link ?

2012-12-04 Thread Salines
*I solved.*


   1. Use html helper for creating links
   2. jshelper for creating js code, use JsHelper :: get, JsHelper :: 
   event, and JsHelper :: Request
   

-- 
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 post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: JsHelper

2012-06-20 Thread Renato Carvalho
I still haven't made any progress, any suggestions?

I have two selects, like  that:

echo $this-Form-select('myFieldInFirstSelect',
$myOptionsInFirstSelect);
echo $this-Form-select('myFieldInSecondSelect',
$myOptionsInSecondSelect, array('value' = $myValueInSecondSelect));

And I am trying something like:

$this-Js-get('#myFirstSelectId')-event('change',
$this-Js-request(array(
'controller'='myCustomController',

'action'='myUpdateSelectFunctionWithoutView'
), array(
'update'='#mySecondSelectId',
'async' = true,
'method' = 'post',
'dataExpression'=true,
'data'= $this-Js-serializeForm(array(
'isForm' = true,
'inline' = true
))
))
);

And in myUpdateSelectFunctionWithoutView, I do:

function myUpdateSelectFunctionWithoutView {
$this-set('myValueInSecondSelect', array('1' = 'option 1'));
}


Any help??

On 18 jun, 03:32, Renato Carvalho renato.inodr...@gmail.com wrote:
 Hello guys,

 I am trying to set the 'value' of a select using the cake 2.x
 JsHelper, but unlucky so far.

 I`ve managed to change all options of the select, but I have no clue
 on how to change only the 'value'.

 I have 2 selects with constant options (the options doesn`t change).
 I want to set the 'value' of the second select, depending on the
 'value' of the first select.

 Does anyone here knows how to do this?

 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: JsHelper

2012-06-20 Thread Борислав Събев
Well I personally do not use JsHelper as I prefer clean JavaScript but 
after reading this tutorial form the CakePHP 
Bookhttp://book.cakephp.org/2.0/en/core-libraries/helpers/js.htmlthe answer 
would be:

?php$this-Js-get('#select1')-event('change', $eventCode);
?

Where $eventCode should change the value of #select2.


With some clean jQuery code the answer will be:

 $(document).ready(function() {

   $('#select1').change(function(){
 $('#select2').val(NEWVALUEHERE);
   });
 
 });



On Monday, 18 June 2012 09:32:04 UTC+3, Renato Carvalho wrote:

 Hello guys, 

 I am trying to set the 'value' of a select using the cake 2.x 
 JsHelper, but unlucky so far. 

 I`ve managed to change all options of the select, but I have no clue 
 on how to change only the 'value'. 

 I have 2 selects with constant options (the options doesn`t change). 
 I want to set the 'value' of the second select, depending on the 
 'value' of the first select. 

 Does anyone here knows how to do this? 

 Thanks.


On Monday, 18 June 2012 09:32:04 UTC+3, Renato Carvalho wrote:

 Hello guys, 

 I am trying to set the 'value' of a select using the cake 2.x 
 JsHelper, but unlucky so far. 

 I`ve managed to change all options of the select, but I have no clue 
 on how to change only the 'value'. 

 I have 2 selects with constant options (the options doesn`t change). 
 I want to set the 'value' of the second select, depending on the 
 'value' of the first select. 

 Does anyone here knows how to do this? 

 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


JsHelper

2012-06-18 Thread Renato Carvalho
Hello guys,

I am trying to set the 'value' of a select using the cake 2.x
JsHelper, but unlucky so far.

I`ve managed to change all options of the select, but I have no clue
on how to change only the 'value'.

I have 2 selects with constant options (the options doesn`t change).
I want to set the 'value' of the second select, depending on the
'value' of the first select.

Does anyone here knows how to do this?

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: JsHelper CakePHP 2.1

2012-05-07 Thread manzapanza
CakePHP 2.1 natively supports jquery
http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html
What you need to do with JsHelper?

Il giorno giovedì 3 maggio 2012 02:11:28 UTC-3, Charles Blackwell ha 
scritto:

 Are there any tutorials available for the JsHelper for CakePHP 2.1 yet?

-- 
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: JsHelper CakePHP 2.1

2012-05-07 Thread Charles Blackwell
I just wanted to know how to do a simple script. For example, do I use 
scriptStart and scriptEnd to enclose the domReady event?

On Monday, May 7, 2012 8:20:03 AM UTC-4, manzapanza wrote:

 CakePHP 2.1 natively supports jquery
 http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html
 What you need to do with JsHelper?

 Il giorno giovedì 3 maggio 2012 02:11:28 UTC-3, Charles Blackwell ha 
 scritto:

 Are there any tutorials available for the JsHelper for CakePHP 2.1 yet?



-- 
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 JsHelper

2012-05-02 Thread Charles Blackwell
You need to switch these two around:
?php 
class Controller extends AppController { 
}  



On Wednesday, February 15, 2012 7:47:50 AM UTC-5, Diablo Sinfuego wrote:

 I have a problem with Js that I cannot resolve. I am basically trying 
 to write a Hello, world app to learn how to use this feature. 

 When I click on my submit button the first time, everything works. 
 When I click on the same button the second time, it blows up trying to 
 go to what appears to be a null controller: 

 Missing Controller 
 Error: Controller could not be found. 
 Error: Create the class Controller below in file: app/Controller/ 
 Controller.php 
 ?php 
 class Controller extends AppController { 
 } 

 Here is my Controller: 

 public function check($id = false) { 
 if (!empty($this-request-data)) { 
 if ($this-RequestHandler-isAjax()) { 
 $this-set('result', 'Hello, world'); 
 $this-render('result', 'ajax'); 
 } 
 } 
 } 

 Here is my View: 

 ?php echo $this-Html-script('jquery', array('inline' = false)); ? 
 ?php 
 echo $this-Form-create(); 
 echo $this-Js-submit('Check', array('update' = 
 '#success')); 
 echo $this-Form-end(); 
 ? 
 div id=success/div 
 div id=checking style=display: none;Checking.../div 
 ?php echo $this-Js-writeBuffer(); ? 

 JsHelper is generating the following JavaScript: 

 script type=text/javascript 
 //![CDATA[ 
 $(#submit-549405557).bind(click, function (event) {$.ajax({data:$ 
 (#submit-549405557).closest(form).serialize(), dataType:html, 
 success:function (data, textStatus) {$(#success).html(data);}, 
 type:post, url:\/hosts\/check}); 
 return false;}); 
 //]] 
 /script 

 I'm stumped why it works on the first click but not the second. 



-- 
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: JsHelper CakePHP 2.1

2012-05-02 Thread Jackson Bicalho

I can turn around and with this:
http://www.cakephp.4uk.pl/




Em 03-05-2012 02:11, Charles Blackwell escreveu:
Are there any tutorials available for the JsHelper for CakePHP 2.1 
yet? --
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



--
Jackson Bicalho
jacksonbica...@gmail.com
jacksonbicalho.com.br
..

Luango - Sistemas e serviços para Internet
www.luango.com.br

Precisando de ajuda?
Acesse:
suporte.luango.com.br

Acompanhe nosso Blog:
blog.luango.com.br

..
cont...@luango.com.br

Horário de atendimento:
 - De segunda a sexta:
 - - das 8:00 as 12:00
 - - das 13:30 as 18:00



--
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 JsHelper

2012-02-15 Thread Diablo Sinfuego
I have a problem with Js that I cannot resolve. I am basically trying
to write a Hello, world app to learn how to use this feature.

When I click on my submit button the first time, everything works.
When I click on the same button the second time, it blows up trying to
go to what appears to be a null controller:

Missing Controller
Error: Controller could not be found.
Error: Create the class Controller below in file: app/Controller/
Controller.php
?php
class Controller extends AppController {
}

Here is my Controller:

public function check($id = false) {
if (!empty($this-request-data)) {
if ($this-RequestHandler-isAjax()) {
$this-set('result', 'Hello, world');
$this-render('result', 'ajax');
}
}
}

Here is my View:

?php echo $this-Html-script('jquery', array('inline' = false)); ?
?php
echo $this-Form-create();
echo $this-Js-submit('Check', array('update' =
'#success'));
echo $this-Form-end();
?
div id=success/div
div id=checking style=display: none;Checking.../div
?php echo $this-Js-writeBuffer(); ?

JsHelper is generating the following JavaScript:

script type=text/javascript
//![CDATA[
$(#submit-549405557).bind(click, function (event) {$.ajax({data:$
(#submit-549405557).closest(form).serialize(), dataType:html,
success:function (data, textStatus) {$(#success).html(data);},
type:post, url:\/hosts\/check});
return false;});
//]]
/script

I'm stumped why it works on the first click but not the second.

-- 
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 JsHelper

2012-02-15 Thread Diablo Sinfuego
This may have been a 2.0.0 problem. I just upgraded to 2.0.6 and the
problem seems to have gone away.

-- 
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 JsHelper

2012-02-15 Thread Diablo Sinfuego
Ok, now what's happening is the first time the submit button is
pressed it processes
and sends the Ajax request to the Controller. The second time the same
submit button
is pressed without reloading the page first, nothing happens.
Reloading the page
causes the submit button to work again.

Is there some sort of reset that needs to be done between button
presses?

I'm not sure if these is a Cake Js issue or a browser issue.

On Feb 15, 9:54 am, Diablo Sinfuego adwo...@netawareinc.com wrote:
 This may have been a 2.0.0 problem. I just upgraded to 2.0.6 and the
 problem seems to have gone away.

-- 
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 JsHelper

2012-02-15 Thread Diablo Sinfuego
Getting closer... Found this post on another site:

  Okay after some research I found out that the 2nd submission is a
black-hole'd one.
  I dont know really why but after editing the code several times
Firebugs says that the
  2nd request is an 404 Error with an HTML answer including the Black-
Hole errors :/

I loaded up Firebug and sure enough, here are the results:

First Submit: 200 OK
Second Submit: 404 Not Found

On the second submit, it is actually returning all of the HTML
including all of the Cake errors of missing controller, like it did in
version 2.0.0. But now it seems to be noticing the 404 and just
tossing the results.

Anyhow with a lot of knowledge in JsHelper know why the first submit
works, yet the second one doesn't? I'm starting to suspect some sort
of incompatibility with the Security 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 JsHelper

2012-02-15 Thread Diablo Sinfuego
Think I have this licked... The problem was with the Security CSRF
protection. If you're set up to use a token only once,
your second Ajax request will get black-holed because the token has
expired.

I'm not sure if this is the best way to handle multiple Ajax requests
with CSRF, but it seems to work. I added the
following to my Controller to ignore CSRF for this particular action:

public function beforeFilter() {
if ($this-action == 'check') {
$this-Security-csrfCheck = false;
}
}

It now lets me process multiple requests without having to reload the
page.

-- 
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: Proper use of JsHelper::object() OR JsHelper::value()

2011-07-19 Thread O.J. Tibi
Thanks for the reply Jens.

I'd use Js::object() too, since it's more descriptive and readable than 
Js::value(), since we're trying to make a JavaScript object in that 
notation, anyway. However, as I was searching through the code, I noticed 
that the JsHelper marks the object() method as @deprecated. I guess this 
means it might be more proper to call Js::value() to future-proof our code.

Cheers,
OJ

-- 
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: Proper use of JsHelper::object() OR JsHelper::value()

2011-07-14 Thread Jens Dittrich
a quick look in the code tells me that $this-Js-object() checks if there 
is native support for json_encode() function and uses that when available. 
It is also able to add $prefix and $postifx to the JSON result. Internally 
it uses the Js-value() function if there is no native support for 
json_encode().
Js-value() calls Js-object() when the variable provided is either array or 
object, so whatever you do unless you are coding float, int, bool or null 
you are using both methods anyway ;-)

I personally use json_encode() since I have native support on my dev and 
prod machines and I do not need $prefix or $postfix. However, I would 
probably use Js-object() rather than Js-value().

-- 
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: Proper use of JsHelper::object() OR JsHelper::value()

2011-07-13 Thread O.J. Tibi
I guess that question was a little too hard to answer, so I'm going to 
replace it a little. :)

By personal preference, when you output JSON to the view, do you use 
JsHelper::object() or JsHelper::value()?

-- 
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


Proper use of JsHelper::object() OR JsHelper::value()

2011-07-12 Thread O.J. Tibi
Hi all,

I've been going through the JsBaseEngineHelper code, and I've been trying to 
figure out which is the proper method to use when sending JSON-encoded 
output. Among things I noticed are that JsHelper::value() does the simple 
data type detection + translation into JSON string, and that 
JsHelper::object() does the heavy-lifting, converting arrays and PHP objects 
into JSON. These methods also call each other, depending on wether the value 
being tested is scalar or not. Other than that, I also noticed that simple 
floats processed with JsHelper::value() are padded with 11 zeros after the 
float, while others processed with JsHelper::object() are not.

So the question is, which is the recommended method of writing JSON strings 
when both of the output are essentially the same?

Cheers,
OJ

-- 
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: observeField equivalent in the new JsHelper

2011-05-31 Thread arron
some more information.

I tried to debug this in firebug. When i used firebug it shows the
proper response so i an cluseless on why it's not showing on my page


I changed my js code to the following. Does anyone have any idea on
why my results are not being displayed


?php
 $this-Js-get('#countries')-event('change', $this-Js-request(
 array('controller' = 'users', 'action' =
 'update_region_select'),
 array(
 'update' = '#regions',
 'async' = true,
 'dataExpression' = true,
 'method' = 'post',
 'data' = $js-serializeForm(array('isForm' = false, 'inline' =
 true))
 ) ) );

 ?

On May 26, 3:49 pm, arron w...@wwisinc.com wrote:
 I have a depdent drop down.

 when someone picks a country the regions from the country populate. It
 works in 1.2, but when i migrated to 1.3 i had to change a few things
 around because the ajax, observeField and javascript helper has been
 deprecated

 I cant figure the observeField equivalent to this

 ?php echo $ajax-

 observeField('countries',array('url'='update_region_select','update'='re 
 gions'));?

 I tried this

 ?php
 $this-Js-get('#country_id')-event('change', $this-Js-request(
 array('controller' = 'countries', 'action' =
 'update_region_select'),
 array(
 'update' = '#region_id',
 'async' = true,
 'dataExpression' = true,
 'method' = 'post',
 'data' = $js-serializeForm(array('isForm' = false, 'inline' =
 true))
 ) ) );

 ?

-- 
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


observeField equivalent in the new JsHelper

2011-05-26 Thread arron
I have a depdent drop down.

when someone picks a country the regions from the country populate. It
works in 1.2, but when i migrated to 1.3 i had to change a few things
around because the ajax, observeField and javascript helper has been
deprecated

I cant figure the observeField equivalent to this

?php echo $ajax-
observeField('countries',array('url'='update_region_select','update'='regions'));?



I tried this


?php
$this-Js-get('#country_id')-event('change', $this-Js-request(
array('controller' = 'countries', 'action' =
'update_region_select'),
array(
'update' = '#region_id',
'async' = true,
'dataExpression' = true,
'method' = 'post',
'data' = $js-serializeForm(array('isForm' = false, 'inline' =
true))
) ) );



?

-- 
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: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2011-03-06 Thread Michael T
So Nic, you got it to work? I didn't have to change the $_callbackArguments 
field; I just modified the callback arguments within my implementation of 
autocomplete().

-- 
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: JsHelper request question

2011-02-23 Thread DavidJ
Hi,

I had the same question few days ago.
find the solution, (I give my example of form creation you can use
your way)

echo $this-Form-create(null,array(
'default' = false,
'inputDefaults' = array(
'label' = false,
'div' = false
)
));

echo $this-Form-input('dateFrom', array(
'id' = 'dateFrom',
));

echo $this-Form-input('dateTo', array(
'id' = 'dateTo',
));

echo $this-Form-end(array(
'label' = 'Get Interval',
'id' = 'get-interval'
));

$this-Js-get('#get-track')-event('click', $this-Js-request(array(
'controller' = 'yoursController',
'action' = 'search'
),array(
'update' = 'target',
'dataExpression' = true,
'method' = 'post',
'data' = $js-serializeForm(array('isForm' = false, 'inline' =
true))
)));


and all values of input what is declared in form you can access in
controller $this-data['dateFrom'], $this-data['dateTo'];

I create form with null so that's why in request I use controller
option. You can create form and put controller so then in request you
don't need.
I hope it helps.



On Feb 14, 12:12 pm, Jens Dittrich jdittr...@gmail.com wrote:
 Hello,

 I have a problem understanding/using the $js-request() function. I
 want to use it to get the value of an input field and send the value
 on an event. But how do I get the value of the input field into the
 requests parameter? My setup is like this:
 $this-Js-get('input')-event('click',$this-Js-request(
   array('action' = 'search'), // -- shouldn't the parameter go in
 here? How to do that with Js?
   array('update' = 'target'
 ));

 Whe using:
 $this-Js-get('input')-event('click', $this-Js-request(
   array('action' = 'search'),
   array('update' = 'target',
          'dataExpression' = true,
          'data' = '$(input).val()'
 ));
 I get a request like ..url/controller/action?value which I do not know
 how to access with cakePHP.

 What am I doing wrong?

 Thank you for your help  time

-- 
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: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2011-02-21 Thread nic

How did you get autocomplete to work with jQuery? I can only find it separate
with jQuery UI and nothing as to how they work together ... or am I missing
something and way off from the start here?
-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/CakePHP-1-3-JSHelper-and-Autocomplete-Missing-method-tp3270384p3393619.html
Sent from the CakePHP mailing list archive at Nabble.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: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2011-02-21 Thread Nic

You will also need to add this as part of the $_callbackArguments :

'autocomplete' = array(
'search' = 'event, ui',
'open' = 'event, ui',
'focus' = 'event, ui',
'select' = 'event, ui',
'close' = 'event, ui',
'change' = 'event, ui',
),

-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/CakePHP-1-3-JSHelper-and-Autocomplete-Missing-method-tp3270384p3393716.html
Sent from the CakePHP mailing list archive at Nabble.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: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2011-02-21 Thread Nic

Sent from my iPhone

On Feb 21, 2011, at 1:42 AM, Nic [via CakePHP] 
ml-node+3393716-227172156-150...@n5.nabble.com wrote:

You will also need to add this as part of the $_callbackArguments :

'autocomplete' = array(
'search' = 'event, ui',
'open' = 'event, ui',
'focus' = 'event, ui',
'select' = 'event, ui',
'close' = 'event, ui',
'change' = 'event, ui',
),


--
 If you reply to this email, your message will be added to the discussion
below:
http://cakephp.1045679.n5.nabble.com/CakePHP-1-3-JSHelper-and-Autocomplete-Missing-method-tp3270384p3393716.html
 To unsubscribe from CakePHP 1.3, JSHelper and Autocomplete, Missing
method?, click 
herehttp://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3270384code=Y3J1c3R5c25haWxAZ21haWwuY29tfDMyNzAzODR8LTE3NjQwNDM2OTI=.

-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/CakePHP-1-3-JSHelper-and-Autocomplete-Missing-method-tp3270384p3393732.html
Sent from the CakePHP mailing list archive at Nabble.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: JsHelper request question

2011-02-15 Thread Jens Dittrich
*push* no idea anyone?

On 14 Feb., 11:12, Jens Dittrich jdittr...@gmail.com wrote:
 Hello,

 I have a problem understanding/using the $js-request() function. I
 want to use it to get the value of an input field and send the value
 on an event. But how do I get the value of the input field into the
 requests parameter? My setup is like this:
 $this-Js-get('input')-event('click',$this-Js-request(
   array('action' = 'search'), // -- shouldn't the parameter go in
 here? How to do that with Js?
   array('update' = 'target'
 ));

 Whe using:
 $this-Js-get('input')-event('click', $this-Js-request(
   array('action' = 'search'),
   array('update' = 'target',
          'dataExpression' = true,
          'data' = '$(input).val()'
 ));
 I get a request like ..url/controller/action?value which I do not know
 how to access with cakePHP.

 What am I doing wrong?

 Thank you for your help  time

-- 
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: JsHelper request question

2011-02-15 Thread Dr. Tarique Sani
On Mon, Feb 14, 2011 at 3:42 PM, Jens Dittrich jdittr...@gmail.com wrote:
 Whe using:
 $this-Js-get('input')-event('click', $this-Js-request(
  array('action' = 'search'),
  array('update' = 'target',
         'dataExpression' = true,
         'data' = '$(input).val()'
 ));
 I get a request like ..url/controller/action?value which I do not know
 how to access with cakePHP.

In the said action write debug($this-params);

See what you get and perhaps i will show you the path

Cheers
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.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: JsHelper request question

2011-02-15 Thread Jens Dittrich
debug($this-params) gives me the return value of $('input').val() as
a key, not a value. The value is empty.

On 15 Feb., 13:34, Dr. Tarique Sani tariques...@gmail.com wrote:
 On Mon, Feb 14, 2011 at 3:42 PM, Jens Dittrich jdittr...@gmail.com wrote:
  Whe using:
  $this-Js-get('input')-event('click', $this-Js-request(
   array('action' = 'search'),
   array('update' = 'target',
          'dataExpression' = true,
          'data' = '$(input).val()'
  ));
  I get a request like ..url/controller/action?value which I do not know
  how to access with cakePHP.

 In the said action write debug($this-params);

 See what you get and perhaps i will show you the path

 Cheers
 Tarique

 --
 =
 PHP for E-Biz:http://sanisoft.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: JsHelper request question

2011-02-15 Thread mark_story
On Feb 14, 5:12 am, Jens Dittrich jdittr...@gmail.com wrote:
 Hello,

 I have a problem understanding/using the $js-request() function. I
 want to use it to get the value of an input field and send the value
 on an event. But how do I get the value of the input field into the
 requests parameter? My setup is like this:
 $this-Js-get('input')-event('click',$this-Js-request(
   array('action' = 'search'), // -- shouldn't the parameter go in
 here? How to do that with Js?
   array('update' = 'target'
 ));

 Whe using:
 $this-Js-get('input')-event('click', $this-Js-request(
   array('action' = 'search'),
   array('update' = 'target',
          'dataExpression' = true,
          'data' = '$(input).val()'
 ));
 I get a request like ..url/controller/action?value which I do not know
 how to access with cakePHP.


Well first off, you're doing a GET request, and it sounds like you
want to do a POST request.  Also 'data' in most javascript libraries
takes an object/dictionary of data, you have a single string.  This
too may cause issues.

$this-Js-get('input')-event('click', $this-Js-request(
array('action' = 'search'),
array('update' = 'target',
  'dataExpression' = true,
  'data' = '{value:$(input).val()}'
)));

One more thing, your selector is extremely greedy, and will bind
events to every input on the page, this is probably not what you
wanted.  Or perhaps it is, I dunno.

-Mark

 What am I doing wrong?

 Thank you for your help  time

-- 
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


JsHelper request question

2011-02-14 Thread Jens Dittrich
Hello,

I have a problem understanding/using the $js-request() function. I
want to use it to get the value of an input field and send the value
on an event. But how do I get the value of the input field into the
requests parameter? My setup is like this:
$this-Js-get('input')-event('click',$this-Js-request(
  array('action' = 'search'), // -- shouldn't the parameter go in
here? How to do that with Js?
  array('update' = 'target'
));

Whe using:
$this-Js-get('input')-event('click', $this-Js-request(
  array('action' = 'search'),
  array('update' = 'target',
 'dataExpression' = true,
 'data' = '$(input).val()'
));
I get a request like ..url/controller/action?value which I do not know
how to access with cakePHP.

What am I doing wrong?

Thank you for your help  time

-- 
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


Why use JsHelper?

2011-02-09 Thread moham...@gmail.com
I was trying to integrate jQuery to use it for some effects in my site
and I started to search for the solution of integrating in the best
way. It simply came to my mind to write a helper which would get the
selector of proper element and output the javascript code.
Then I ran into the new JsHelper in cake 1.3 but I'm really having
problems understanding the concept of JsHelper. I mean for sure each
JavaScript block that I'm gonna write is more than one call to jQuery
methods and many of them are also not transfered to JsHelper. So for
what reason may I use the JsHelper? it would be much easier to write
the javascript specified for my action inside a helper and use it
simply as any other helper. The only thing which comes to my mind as a
good capability is to use the caching and buffering options provided
in JsHelper nothing more. Did I understood the JsHelper well or I have
missed some points?

-- 
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


How create a AjaxInPlaceEditor with the new JSHelper?

2011-01-16 Thread Celso
Hi, like http://bit.ly/e8eJqg, i need using AjaxInPlaceEditor with the
new JSHelper 1.3/2.0.
A generic (prototype, jquery, mootools) InPlaceEditor Is
possible ???

Thanks,
Celso.

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: Rendering difference between JSHelper and AjaxHelper (CSS related)

2011-01-07 Thread ojonam
I figured it out, sorry for the trouble. It was a simple naming issue.

On Jan 6, 5:07 pm, ojonam manojo10...@gmail.com wrote:
 Hi,

 I am migrating from AjaxHelper to JsHelper (as the former is
 deprecated), and am converting $ajax-autoComplete calls in the
 following way (I stay with Prototype JS): for a given

 $ajax-autoComplete('div', 'url', array());

 I now get the following (much more blown-up in size):

 ?php echo $this-Form-text('field', array('id' = 'field_id')));?
 div id=div_choices class=autocomplete/div

 and the following javascript:

 echo $this-Html-scriptBlock(
                 $this-Js-domReady(
                 new Ajax.Autocompleter(
                         'field_id',
                         'div_choices',
                         'url'

                 )
                 )
         );

 For those who know, you can customize the css so that the resulting
 autocomplete div will be nicely rendered.

 With AjaxHelper, this worked perfectly fine, but I do not get the
 rendering to take place when I use JSHelper. Playing with firebug, I
 notice that if I change the div class name from autocomplete to
 something else and back, I get the correct rendering.

 My question therefore is: does JsHelper do some kind of pre-loading of
 the js files which makes css rendering incompatible? If so, how do I
 react to that?

 Thanks,
 ojonam

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


Rendering difference between JSHelper and AjaxHelper (CSS related)

2011-01-06 Thread ojonam
Hi,

I am migrating from AjaxHelper to JsHelper (as the former is
deprecated), and am converting $ajax-autoComplete calls in the
following way (I stay with Prototype JS): for a given

$ajax-autoComplete('div', 'url', array());

I now get the following (much more blown-up in size):

?php echo $this-Form-text('field', array('id' = 'field_id')));?
div id=div_choices class=autocomplete/div

and the following javascript:

echo $this-Html-scriptBlock(
$this-Js-domReady(
new Ajax.Autocompleter(
'field_id',
'div_choices',
'url'

)
)
);

For those who know, you can customize the css so that the resulting
autocomplete div will be nicely rendered.

With AjaxHelper, this worked perfectly fine, but I do not get the
rendering to take place when I use JSHelper. Playing with firebug, I
notice that if I change the div class name from autocomplete to
something else and back, I get the correct rendering.

My question therefore is: does JsHelper do some kind of pre-loading of
the js files which makes css rendering incompatible? If so, how do I
react to that?

Thanks,
ojonam

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: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2010-11-23 Thread Michael T
I ran into this issue a while ago. I decided to add the autocomplete
method to the JsHelper / jQuery engine myself. Here's what you need to
do.

In jquery_engine.php, you need to create an autocomplete method. You
can copy/paste from a similar method e.g. the 'sortable' method. You
might want to make some modifications regarding the callback functions
that you pass in the options argument. This is what I had in the end:

/**
 * Create an autocomplete element.
 *
 * @param array $options Array of options for the autocomplete.
 * @return string Completed autocomplete script.
 * @access public
 * @see JsBaseEngineHelper::autocomplete() for options list.
 */
function autocomplete($options = array()) {
$template = '%s.autocomplete({%s});';
// don't escape the 'select' or 'search' functions
$callbacks = array('select', 'search');
return $this-_methodTemplate('autocomplete', $template, 
$options,
$callbacks);
}

Note that if you want to use Autocomplete's custom rendering (http://
jqueryui.com/demos/autocomplete/#custom-data), you'll have to change
the template above and allow for additional arguments that specify the
rendering function.

If you want to make the rendered JS for the autocomplete appear in the
JS buffer, you need to add your 'autocomplete' method to the list of
bufferedMethods in the JsBaseEngineHelper class (js.php).

That should be it! You can then use your autocomplete in your view
like this:

$this-Js-get('#employee_autocomplete')-autocomplete(
array(  'source' = $this-Html-
url(array('controller'='employees',
'action'='get_employee_names')),
'minLength' = 3,
'search' = 'function (event, ui) { ... }',
'select' = 'function (event, ui) { ... }'));

One last hint - FireBug (or similar network debugging tool) is your
friend when trying to figure out why your AJAX posts don't return any
results. You can check the Response tab for Cake/PHP generated
errors.

Hope this helps!

On Nov 19, 7:06 am, nurvzy nur...@gmail.com wrote:
 That cookbook link you reference is for the Ajax Helper, not the
 JsHelper.  To my knowledge autocomplete is not supported out of the
 box using the JsHelper.  But it's simple enough to do on your own.

 http://docs.jquery.com/UI/Autocomplete

 Nick

 On Nov 18, 1:09 am, Louie Miranda lmira...@gmail.com wrote:







  I am trying to migrate my autocomplete to JSHelper using JQuery (As the
  default). And I think there are no documentation or examples yet that has
  been publicized as of this writing.

  Anyway, I did what the manual has told...

  *Controller:*
  var $helpers = array('Html', 'Form', 'Time', 'Js' = array('Jquery'));

  *Default.ctp*
  echo 
  $html-script('http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js');
  $this-Js-JqueryEngine-jQueryObject = '$j';
  print $this-Html-scriptBlock('var $j = jQuery.noConflict();',
      array('inline' = false)); //Tell jQuery to go into noconflict mode

  *Now, from autocomplete (under view).*

  *The old code:*
  ?php echo $ajax-autoComplete('q', '/publications/autocompletetitle',
  array('minChars' = 4, 'class' = 'search')); ?

  *Was switched to the following:*
  ?php echo $js-autoComplete('q', '/publications/autocompletetitle',
  array('minChars' = 4, 'class' = 'search')); ?

  And the usual, it did not worked! :(. I turned-on debug and found this error
  message.
  *JsHelper:: Missing Method autoComplete is undefined
  [CORE/cake/libs/view/helpers/js.php, line 154]*

  So, I searched the API for 
  JSHelper.http://api13.cakephp.org/view_source/js-helper/

  And I did not find the code. The odd thing was actually following the
  example of the cakephp book for 1.3 for 
  autocomplete.http://book.cakephp.org/view/1370/autoComplete, and it turned 
  out wrong.

  Any ideas, how can I make autocomplete work on the new JSHelper? But, if the
  method does not exist, then it won't make any sense. I think I am missing
  something here? :(

  Please help.
  --
  Louie Miranda
   - Email: lmira...@gmail.com
   - Web:http://www.louiemiranda.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


CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2010-11-18 Thread Louie Miranda
I am trying to migrate my autocomplete to JSHelper using JQuery (As the
default). And I think there are no documentation or examples yet that has
been publicized as of this writing.

Anyway, I did what the manual has told...

*Controller:*
var $helpers = array('Html', 'Form', 'Time', 'Js' = array('Jquery'));

*Default.ctp*
echo $html-script('
http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js');
$this-Js-JqueryEngine-jQueryObject = '$j';
print $this-Html-scriptBlock('var $j = jQuery.noConflict();',
array('inline' = false)); //Tell jQuery to go into noconflict mode

*Now, from autocomplete (under view).*

*The old code:*
?php echo $ajax-autoComplete('q', '/publications/autocompletetitle',
array('minChars' = 4, 'class' = 'search')); ?

*Was switched to the following:*
?php echo $js-autoComplete('q', '/publications/autocompletetitle',
array('minChars' = 4, 'class' = 'search')); ?

And the usual, it did not worked! :(. I turned-on debug and found this error
message.
*JsHelper:: Missing Method autoComplete is undefined
[CORE/cake/libs/view/helpers/js.php, line 154]*

So, I searched the API for JSHelper.
http://api13.cakephp.org/view_source/js-helper/

And I did not find the code. The odd thing was actually following the
example of the cakephp book for 1.3 for autocomplete.
http://book.cakephp.org/view/1370/autoComplete, and it turned out wrong.

Any ideas, how can I make autocomplete work on the new JSHelper? But, if the
method does not exist, then it won't make any sense. I think I am missing
something here? :(

Please help.
--
Louie Miranda
 - Email: lmira...@gmail.com
 - Web: http://www.louiemiranda.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: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2010-11-18 Thread nurvzy
That cookbook link you reference is for the Ajax Helper, not the
JsHelper.  To my knowledge autocomplete is not supported out of the
box using the JsHelper.  But it's simple enough to do on your own.

http://docs.jquery.com/UI/Autocomplete

Nick

On Nov 18, 1:09 am, Louie Miranda lmira...@gmail.com wrote:
 I am trying to migrate my autocomplete to JSHelper using JQuery (As the
 default). And I think there are no documentation or examples yet that has
 been publicized as of this writing.

 Anyway, I did what the manual has told...

 *Controller:*
 var $helpers = array('Html', 'Form', 'Time', 'Js' = array('Jquery'));

 *Default.ctp*
 echo 
 $html-script('http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js');
 $this-Js-JqueryEngine-jQueryObject = '$j';
 print $this-Html-scriptBlock('var $j = jQuery.noConflict();',
     array('inline' = false)); //Tell jQuery to go into noconflict mode

 *Now, from autocomplete (under view).*

 *The old code:*
 ?php echo $ajax-autoComplete('q', '/publications/autocompletetitle',
 array('minChars' = 4, 'class' = 'search')); ?

 *Was switched to the following:*
 ?php echo $js-autoComplete('q', '/publications/autocompletetitle',
 array('minChars' = 4, 'class' = 'search')); ?

 And the usual, it did not worked! :(. I turned-on debug and found this error
 message.
 *JsHelper:: Missing Method autoComplete is undefined
 [CORE/cake/libs/view/helpers/js.php, line 154]*

 So, I searched the API for 
 JSHelper.http://api13.cakephp.org/view_source/js-helper/

 And I did not find the code. The odd thing was actually following the
 example of the cakephp book for 1.3 for 
 autocomplete.http://book.cakephp.org/view/1370/autoComplete, and it turned 
 out wrong.

 Any ideas, how can I make autocomplete work on the new JSHelper? But, if the
 method does not exist, then it won't make any sense. I think I am missing
 something here? :(

 Please help.
 --
 Louie Miranda
  - Email: lmira...@gmail.com
  - Web:http://www.louiemiranda.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


JsHelper loading issue

2010-09-16 Thread hashmich
Hi there,
I have

var $helper = array(
   'Js' = array('Prototype')
);

declared in AppController and my custom-PagesController.
Anyhow I see some jQuery-script beeing rendered, as I call

$this-render('/pages/home');

from my controller.
I even tried declaring the helper and engine from there with no
effort...
If I call a redirect or hit the page directly everything is fine:
Prototype-code.

My way out of there could be changing the default name of the
engineClass from jQuery to Prototype.
I'm not shure, if this is a bug. Has anyone experienced something
similar or a better idea than editing the JsHelperFile?

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: JsHelper loading issue

2010-09-16 Thread hashmich
Forgot to say: This happened with cake 1.3.3

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


JsHelper - Quotes issues

2010-09-13 Thread Daniel M. Ivasse
Hi

I have two issues on JsHelper.
Could someone help me, please?

1) The key data in $options parameter of request function outputs
a javascript code between quotes. So when I use something like data =
$js-get(#myForm)-
serializeForm() it doesn't work. In submit function the data
parameter is right, but it also happens in link function. Is there
any mistake in my use?


Example:

This code:

echo $js-submit( Submit button, array( url = /controller1/
action1, update = #myDiv ) );

Results in this javascript code:

$(#submit-709077).bind(click, function (event) {$.ajax({data:$
(#submit-709077).closest(form).serialize() ...

While these:

echo $js-link( my link, /controller1/action1, update =
#myDiv, data = $js-serializeForm( array( isForm = true,
inline = true ) ) );
echo $js-request( /controller1/action1, array( update =
#myDiv, data = $js-serializeForm() ) );

Result in these:

... $.ajax( {data:$(\#myForm\).serialize() }
... $.ajax({data:$(#link-709077).closest(form).serialize() ...



2) Strings in javascript code are always written between double quotes
as the html tag attributes. When something like this 'onclick' = $js-
request... is used in a htmlAttributes array, the quotes remain
unpaired. Is there any configuration to use single quotes instead of
double quotes?



Thanks!

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


Error with Jshelper in Simpletest test case

2010-07-07 Thread Alex Tsui
I'm writing a Simpletest test case for a helper class that uses Js
helper, which has the value method for turning arbitrary PHP objects
into JSON. I've done the setup: import the Js helper and construct it
before using it. This is the error I'm getting:

Fatal error: Call to a member function value() on a non-object in /var/
www/atsui/meep/cake/libs/view/helpers/js.php on line 182

Here's the source code for my test case:

App::import('Helper', 'Js');
App::import('Helper', 'Googlemap');

class GooglemapHelperTestCase extends CakeTestCase {
function startTest() {
$this-Googlemap = new GooglemapHelper();
$this-Js = new JsHelper();
}

function testJs() {
$testArray = array(
'border' = '1px solid black',
'padding' = '5px',
'float' = 'left',
'clear' = 'both',
);
debug($this-Js-value($testArray));
}

function endTest() {
unset($this-Googlemap);
unset($this-Js);
ClassRegistry::flush();
}
}

The intention is to test my helper (Googlemap above), which uses the
Js helper, and the same error will appear if I just test a method in
my helper that uses $this-Js-value. I wonder what I'm missing in
this setup?

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: How create a observeField with the new JSHelper?

2010-05-04 Thread cguyer
how do i pass the data of the input box to the function? not even sure
$js-request is what i should use for this. Ideas is that as a person
types in a textbox, it does a search and updates a results div. help
=D


//form element
echo $form-
input('Facility.facility_name',array('size'='40','label'='Name or
Address'));


//Old Ajax Helper
echo $ajax-
observeField('FacilityFacilityName',array('update'='facilitylist','url'='update_facility','frequency'='1'));

//New Ajax Helper
$js-get('#FacilityFacilityName');
$js-event('keyup', $js-request('/users/
update_facility',array('update'='#facilitylist','data'=???)));

On May 3, 2:18 pm, cguyer colbygu...@gmail.com wrote:
 i'm also trying to figure out this myself, hacking through the new
 help and learning jquery. any help would also be appreciated.

 On Apr 30, 2:38 pm, Celso cels...@gmail.com wrote:

  Hi ! I want using the new JSHelper with Jquery, i need create a
  observeField to fill a combo with another combo that changed

  Thanks!
  Celso

  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.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 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.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

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: How create a observeField with the new JSHelper?

2010-05-04 Thread cguyer
I finally came up with a solution. I don't know if this is the best
solution but it looks like it will work. Will comment back in a day or
two if i remember =)

$js-get('#FacilityFacilityName')-event('keyup', $js-
request(array('controller'='users','action'='update_facility'),array('update'='#facilitylist','dataExpression'=true,'data'=
$js-serializeForm(array('isForm' = false, 'inline' = true)) )));

On May 4, 11:05 am, cguyer colbygu...@gmail.com wrote:
 how do i pass the data of the input box to the function? not even sure
 $js-request is what i should use for this. Ideas is that as a person
 types in a textbox, it does a search and updates a results div. help
 =D

 //form element
 echo $form-input('Facility.facility_name',array('size'='40','label'='Name 
 or

 Address'));

 //Old Ajax Helper
 echo $ajax-

 observeField('FacilityFacilityName',array('update'='facilitylist','url'='update_facility','frequency'='1'));

 //New Ajax Helper
 $js-get('#FacilityFacilityName');
 $js-event('keyup', $js-request('/users/
 update_facility',array('update'='#facilitylist','data'=???)));

 On May 3, 2:18 pm, cguyer colbygu...@gmail.com wrote:



  i'm also trying to figure out this myself, hacking through the new
  help and learning jquery. any help would also be appreciated.

  On Apr 30, 2:38 pm, Celso cels...@gmail.com wrote:

   Hi ! I want using the new JSHelper with Jquery, i need create a
   observeField to fill a combo with another combo that changed

   Thanks!
   Celso

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   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 
   athttp://groups.google.com/group/cake-php?hl=en

  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.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 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.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

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: How create a observeField with the new JSHelper?

2010-05-03 Thread cguyer
i'm also trying to figure out this myself, hacking through the new
help and learning jquery. any help would also be appreciated.

On Apr 30, 2:38 pm, Celso cels...@gmail.com wrote:
 Hi ! I want using the new JSHelper with Jquery, i need create a
 observeField to fill a combo with another combo that changed

 Thanks!
 Celso

 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.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

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


How create a observeField with the new JSHelper?

2010-04-30 Thread Celso
Hi ! I want using the new JSHelper with Jquery, i need create a
observeField to fill a combo with another combo that changed

Thanks!
Celso

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: 1.3 JsHelper getting started - basic question

2009-12-23 Thread stefano
try with $Js

On Tue, Dec 22, 2009 at 11:41 AM, camillemoussette
camillemousse...@yahoo.com wrote:
 Hello,

 I'm trying to use the new JsHelper in 1.3 but I'm hitting a (stupid)
 wall. Whenever I follow the code from the documentation or the
 examples available online, I always get this error

 Notice (8): Undefined variable: js [APP/views/layouts/default.ctp,
 line 106]

 It seems that the JsHelper is not loading properly and the $js object
 is not assigned. Can you help? It must be super simple. I get the
 proper javascript output in the head and all.

 I have in my app_controller.php
 var $helpers = array('Js' = array('Jquery'));

 and

 my in my view, just before the body tag
 ?php echo $js-writeBuffer(); ?

 PS. I'm following Mark's tutorial at
 http://mark-story.com/posts/view/creating-simple-ajax-pagination-with-cakephp-1-3-and-mootools

 Thanks


 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




-- 
Stefano Salvatori M.
http://stefano.salvatori.cl/

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: 1.3 JsHelper getting started - basic question

2009-12-23 Thread Walther
The correct way in 1.3 is $this-Js

On Dec 23, 9:19 pm, stefano ssalvat...@gmail.com wrote:
 try with $Js

 On Tue, Dec 22, 2009 at 11:41 AM, camillemoussette



 camillemousse...@yahoo.com wrote:
  Hello,

  I'm trying to use the new JsHelper in 1.3 but I'm hitting a (stupid)
  wall. Whenever I follow the code from the documentation or the
  examples available online, I always get this error

  Notice (8): Undefined variable: js [APP/views/layouts/default.ctp,
  line 106]

  It seems that the JsHelper is not loading properly and the $js object
  is not assigned. Can you help? It must be super simple. I get the
  proper javascript output in the head and all.

  I have in my app_controller.php
  var $helpers = array('Js' = array('Jquery'));

  and

  my in my view, just before the body tag
  ?php echo $js-writeBuffer(); ?

  PS. I'm following Mark's tutorial at
 http://mark-story.com/posts/view/creating-simple-ajax-pagination-with...

  Thanks

  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.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 --
 Stefano Salvatori M.http://stefano.salvatori.cl/

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


1.3 JsHelper getting started - basic question

2009-12-22 Thread camillemoussette
Hello,

I'm trying to use the new JsHelper in 1.3 but I'm hitting a (stupid)
wall. Whenever I follow the code from the documentation or the
examples available online, I always get this error

Notice (8): Undefined variable: js [APP/views/layouts/default.ctp,
line 106]

It seems that the JsHelper is not loading properly and the $js object
is not assigned. Can you help? It must be super simple. I get the
proper javascript output in the head and all.

I have in my app_controller.php
var $helpers = array('Js' = array('Jquery'));

and

my in my view, just before the body tag
?php echo $js-writeBuffer(); ?

PS. I'm following Mark's tutorial at
http://mark-story.com/posts/view/creating-simple-ajax-pagination-with-cakephp-1-3-and-mootools

Thanks


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