Re: Ajax Autocomplete is not working !

2008-06-10 Thread MMatchan

Clement, Thanks a million. I made the path relative and removed the
echo 'in the loop' and voila!

Appreciate it

--~--~-~--~~~---~--~~
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: Ajax Autocomplete is not working !

2008-06-10 Thread clemos

Hi

I think your problem is here in your view :
> autoComplete('Post/title' ,'/myapps/blog/posts/
> autoComplete');?>
The url you use looks absolute, whereas it should be, as with all Cake
helpers, relative to your app (probably : "/blog/posts/autoComplete")
You should probably remove "echo "in the loop"; as well...

By the way, creating your form will be easier with the form helper:
"create("/posts/autoComplete") ?>"

And last, but not least, for all ajax debugging, I advise you to
install Firebug (https://addons.mozilla.org/fr/firefox/addon/1843)
It would have very quickly pointed you to the fact that your ajax
request was returning a 404, and not the page you wanted.

++
Clément

On Tue, Jun 10, 2008 at 5:50 PM, MMatchan <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Im brand new to Cake and to PHP in general. Im trying to setup a
> simple Ajax Autocomplete script going.. I have a DB table called Posts
> with a bunch of names called Title.
> I just want to have a simple textbox that autocompletes and fills in
> the selected title...
>
> Im using CAKE PHP v 1.2 . My probem is that the textbox renders
> correctly but the AJAX part is not working What am I missing ? Pls
> help
>
> Here is a snippet from my controller (posts_controller.php)
>
>  function autoComplete()
>{
>echo 'in the loop';
>  //$this->set('posts',$this->Post->findAll("title LIKE '{$this-
>>data['Post']['title']}'"));
>$this->set('posts', $this->Post->findAll());
>$this->layout = 'ajax';
> }
>
>
> Here is a snippet from my view (view.thtml)
>
>
>  autoComplete('Post/title' ,'/myapps/blog/posts/
> autoComplete');?>
>
>
>
> Here is a snippet from my view (auto_complete.thml)
> 
> 
> 
> 
> 
> 
>   
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Ajax Autocomplete is not working !

2008-06-10 Thread clemos

Actually, the top best definitive line would be :
autoComplete('Post.title' ,'/posts/autoComplete');?>
CakePHP 1.2 prefers "Model.field" over the old "Model/field" way.

+++
Clément

On Tue, Jun 10, 2008 at 10:27 PM, clemos <[EMAIL PROTECTED]> wrote:
> Hi
>
> I think your problem is here in your view :
>> autoComplete('Post/title' ,'/myapps/blog/posts/
>> autoComplete');?>
> The url you use looks absolute, whereas it should be, as with all Cake
> helpers, relative to your app (probably : "/blog/posts/autoComplete")
> You should probably remove "echo "in the loop"; as well...
>
> By the way, creating your form will be easier with the form helper:
> "create("/posts/autoComplete") ?>"
>
> And last, but not least, for all ajax debugging, I advise you to
> install Firebug (https://addons.mozilla.org/fr/firefox/addon/1843)
> It would have very quickly pointed you to the fact that your ajax
> request was returning a 404, and not the page you wanted.
>
> ++
> Clément
>
> On Tue, Jun 10, 2008 at 5:50 PM, MMatchan <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>
>> Im brand new to Cake and to PHP in general. Im trying to setup a
>> simple Ajax Autocomplete script going.. I have a DB table called Posts
>> with a bunch of names called Title.
>> I just want to have a simple textbox that autocompletes and fills in
>> the selected title...
>>
>> Im using CAKE PHP v 1.2 . My probem is that the textbox renders
>> correctly but the AJAX part is not working What am I missing ? Pls
>> help
>>
>> Here is a snippet from my controller (posts_controller.php)
>>
>>  function autoComplete()
>>{
>>echo 'in the loop';
>>  //$this->set('posts',$this->Post->findAll("title LIKE '{$this-
>>>data['Post']['title']}'"));
>>$this->set('posts', $this->Post->findAll());
>>$this->layout = 'ajax';
>> }
>>
>>
>> Here is a snippet from my view (view.thtml)
>>
>>
>>  autoComplete('Post/title' ,'/myapps/blog/posts/
>> autoComplete');?>
>>
>>
>>
>> Here is a snippet from my view (auto_complete.thml)
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Ajax AutoComplete Component issues..

2008-03-06 Thread Siegfried Hirsch

If you use 1.2 take a look at the new manual, I used it and it worked for me:
http://book.cakephp.org/view/208/ajax

search for autocomplete

2008/3/6, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

--~--~-~--~~~---~--~~
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: Ajax->autocomplete adding a '1' below the form field

2007-03-24 Thread Chris Hartjes

On 3/23/07, yolabingo <[EMAIL PROTECTED]> wrote:
>
> 
>  autoComplete('User/livesearch', '/users/
> search'); ?>
> 

Well, the problem might be that you're doing echo print above instead
of just echo or print. :)

The output of print is always 1 when doing a comparison, so that
command becomes "echo 1", hence the 1 showing up in your output.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digital photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: ajax autoComplete example

2007-01-18 Thread taylor


just a thought, add the link to the controls javascript file.

Stefan wrote:

I wanted to make an autocomplete for a form field called City.
This is what I've done:

In EmployeesController:

var $components = array ('RequestHandler');
var $helpers = array('Html','Form','Htmlx','Javascript','Ajax');
var $uses = array('Employee','City','Department');

function add() {
if($this->RequestHandler->isAjax()) {
$data = $this->data;
$sCity = isset($data["Employee"]["city_a"]) &&
$data["Employee"]["city_a"] ? $data["Employee"]["city_a"] : "");
$this->set('Departments',
$this->Department->generateList(null,null,null, "{n}.Department.id",
"{n}.Department.name"));
$this->set('Cities', $this->City->findAll("City.name ILIKE
'".$sCity."%'"));
$this->render('ajax');
}
else {
if(empty($this->data)) {
... stuff
//exactly the same as without ajax autoComplete
if($this->Employee->save($this->data)) { }
else { }
  }
}

In views/employees/add.thmtl:

link('prototype'); ?>
link('scriptaculous'); ?>

like this:

link('controls'); ?>

it won't work without it.



labelTag('Employee/city', City');?>



autoComplete("Employee/city", "/employees/add");?>


In views/employees/ajax.thtml:


 $output) { ?>
">

No city with this name was found.



Made a helper function in an extension of HtmlHelper called
HtmlxHelper:

uses('view/helpers/html');
class HtmlxHelper extends HtmlHelper
{
var $helpers = array('Ajax');

function autoComplete($field, $url = "", $options = array(), $return =
false) {
$this->setFormTag($field);
$tagId['id'] = $this->model . Inflector::camelize($this->field);
$output = '
function set'.$tagId['id'].'(string,li) {
if(li.id) {
document.getElementById("'.$tagId['id'].'").value = li.id;
}
else {
document.getElementById("'.$tagId['id'].'A").value = "";
document.getElementById("'.$tagId['id'].'").value = "";
}
}
';

$output .= $this->Ajax->autoComplete($field.'_a', $url,
array('style'=>'width:400px','minChars'=>'3','indicator'=>'loading'.$tagId['id'],'afterUpdateElement'=>'set'.$tagId['id']));

$output .= ''.$this->image("spinner.gif",array("style"=>"padding-bottom:2px;
vertical-align:middle")).' Loading...';

$output .= $this->hidden($field,
array('value'=>$this->tagValue($field)));
return $this->output($output, $return);
}
}


Why $data["Employee"]["city_a"] in the add() action ?
Because in the helper the autocomplete field will be named :
$this->Ajax->autoComplete($field.'_a' 

What are 'indicator', 'afterUpdateElement' ?
They are explained here :
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter

What's the purpose of Information you don't want
to be inserted into the autocomplete form ?
It is explained here :
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter

The autocomplete is working fine, with 2 autocomplete fields in the
same form.
Very usefull was Firebug : www.getfirebug.com/
Thanks to the other members, their postings were very helpfull.



--~--~-~--~~~---~--~~
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: ajax autoComplete example

2006-11-27 Thread Christoph

> Christoph a scris:
> > Except I tried that.  I've even tried following the bakery article that
> > is based on that.  But nothing I do seems to get it to work.  See my
> > post here:
> > http://groups.google.com/group/cake-php/browse_frm/thread/ea0519608cc51b74/?hl=en#
> > that still hasn't been replied to... :(  Autocomplete seems incredibly
> > difficult to me...

mirceade wrote:
> Ha, ha. I HAVE FOUND IT Christoph (had the same problem). You must
> include the model you are using in the autocompletion in the controller
> code like this:
> var $uses = array('Category');
> where Category is the model you are autocompleting from. The rest is
> like in the tutorial.

Nope, that isn't what's wrong.  At least not for me.  Because the field
I'm trying to set up autocomplete for is a field that is part of the
model for the controller I'm using.

*sigh*

I've tried everything I can possible think of to try to get it to work
but it just won't.  And I know Ajax is working.  I have it working
(finally) with my pagination.  Just not the autocomplete... :(

thnx,
Christoph


--~--~-~--~~~---~--~~
 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: Ajax Autocomplete - No Errors, No Worky

2006-09-05 Thread nate

Do you have a view file for Students/autocomplete?  I wrote a component
for handling autocompleting here:
http://cakeforge.org/snippet/detail.php?type=snippet&id=70, which you
can use instead of having to write a view.  My other suggestion would
be to use FireBug to examine the request/response pairs generated by
the auto-complete field.


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



Re: AJAX Autocomplete silently failing

2006-08-01 Thread jonathan

Nate - I would like to pass in some SQL code (e.g. ORDER BY
model.field) into the autocomplete.php component.  It looks like
handles is set to an array and then checked to see if it's empty?
Sorry if I am missing the obvious...

Thanks,
Jonathan


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



Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan

Wow - I think it finally works exactly like I need it to.  Many thanks
to Nate for his component wizardry and daxroc on IRC for spending hours
with me debugging this.

Fixes I needed to make:
https://trac.cakephp.org/ticket/1154

And from our friends at the RubyOnRails forum (this was the clincher):
http://dev.rubyonrails.org/ticket/4782

If you want to implement this, use the controls.js.2.patch file.
Basically I now have an autocompleter that gives a scrollable list of
results which works in IE and Firefox (the only browsers my clients
would ever use to run this app).

I almost want to cry.


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



Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan

Thanks Nate - that was it - the thing works brilliantly now.  And now
for something completely different:

I used CSS to set a max-height and overflow:auto for the returned list,
so if the results are lengthy, I get a scrollable list.  Of course, IE
(pre-7) does not recognize max-height but that's another story.  My
solution works perfectly in Firefox, but in IE, if you click the
scrollbar to scroll through the list, the list disappears!  You can use
the mouse's scroll wheel, but not the scrollbar itself.

example here: http://www.ultimediaintl.com/ivsCake/entities  (search
with Arizona (minChars = 4))

I know this has nothing to do with the Cake framework, but if anyone
knows a work-around, I'd be truly obliged...

Jonathan


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



Re: AJAX Autocomplete silently failing

2006-07-31 Thread nate

Sorry, it should actually be 'minChars', not 'minChar'.  That's why the
key wasn't being recognized by AjaxHelper.


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



Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan

Hey Nate - when I pass in minChar, it adds it to the text field and not
the Ajax call:

echo
$ajax->autocomplete('Entity/name','/entities',array('size'=>'40','minChar'=>'4'))

produces:



new Ajax.Autocompleter('EntityName',
'EntityName_autoComplete', '/ivsCake/entities', {});

Could the AJAX helper be modified to account for the minChar parameter?

Thanks for the outstanding effort in this project!


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



Re: AJAX Autocomplete silently failing

2006-07-31 Thread nate

http://api.cakephp.org/class_ajax_helper.html#023c127898fec19debbb715010383935

You should be able to pass 'minChar' in the $options array.


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



Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan

OK, I commented out the check for isAjax in the component and got it
working - not sure why it's "not Ajax" but it is so it works.  I'd
still like to set the minChar, though - any thoughts?  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
-~--~~~~--~~--~--~---



Re: AJAX Autocomplete silently failing

2006-07-31 Thread jonathan

Does anyone have any complete examples?  I just can't seem to get this
thing working.  I'd also like to pass in the minChar variable - any
chance of doing this?

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



Re: AJAX Autocomplete silently failing

2006-07-26 Thread Gregg Larson
I had the same problems, but followed this topic and got it working:
http://groups.google.com/group/cake-php/browse_thread/thread/e51e10b1b1cb3224/7c079137faa9259e?lnk=gst&q=autocomplete&rnum=1#7c079137faa9259eIn terms of not getting a clue to what is going on, here's what  I did:
In firefox, I found it useful to use The "Miscellaneous->Show  Hidden Elements" in the web developer toolbar.  Even after all of this,  I had some SQL errors.  This kept the Div Element set to hidden, even 
 though it was populated with some SQL text that I needed to see.  Showing the Hidden elements let me know that the autocomplete was  working, which felt frickin great. 
GreggOn 7/22/06, bingo <[EMAIL PROTECTED]> wrote:
Hi Nate,I tried changing to Author/last_name...but it is not helping...I also tried firebug to determine error. But the debugger is notshowing any error.Do you think the structure of library might affect. I am using
following structure- app  - webroot-js  - prototype- prototype.js  - scriptaculous- scriptaculous.jsand in the auto.thtml I am using
echo $_javascript_->link('prototype/prototype');echo $_javascript_->link('scriptaculous/scriptaculous');?>I am not getting any clue of what is causing the problem...Is there any
demoRegards,
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Re: AJAX Autocomplete silently failing

2006-07-22 Thread bingo

Hi Nate,

I tried changing to Author/last_name...but it is not helping...
I also tried firebug to determine error. But the debugger is not
showing any error.

Do you think the structure of library might affect. I am using
following structure
- app
  - webroot
-js
  - prototype
- prototype.js
  - scriptaculous
- scriptaculous.js

and in the auto.thtml I am using

link('prototype/prototype');
echo $javascript->link('scriptaculous/scriptaculous');
?>

I am not getting any clue of what is causing the problem...Is there any
demo

Regards,


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



Re: AJAX Autocomplete silently failing

2006-07-22 Thread nate

The autocomplete="off" setting disables the browser's built-in
autocomplete functionality if it is active.  Bingo, it looks like the
case of your field name is off, I'm guessing it should actually be
'Author/last_name'.

Also, anyone debugging autocomplete or other Ajax fields would do well
to use FireBug to examine the responses.


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



Re: AJAX Autocomplete silently failing

2006-07-22 Thread bingo

Hi,

I tried changing two things
autocomplete="on"
and $ajax->autoComplete('Author/Last_Name', '/authors/autocomplete');

but it is still not working..here is the generated code of the view


Last Name


new Ajax.Autocompleter('AuthorLastName',
'AuthorLastName_autoComplete', '/cake/authors/autcomplete',
{});

Regards


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



Re: AJAX Autocomplete silently failing

2006-07-21 Thread Mechanic

It looks like it's actually hardcoded 'off' in the autocomplete API
itself.  I turned it on.  Don't know if that did anything.

However, after making a lot of changes based on reading just about
every article I could find relating to this kind of problem, reworking
the line in the view:

autoComplete('OrganizationLeaders/name','/organization_leaders/autocomplete');
?>

seemed to fix my 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
-~--~~~~--~~--~--~---



Re: AJAX Autocomplete silently failing

2006-07-21 Thread bingo

Hi.

Even I have exactly smae problem...I am also not sure what
autocomplete=off means. 

Regards,


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



Re: ajax autocomplete.

2006-06-29 Thread sicapitan

man i'd pay this guy $50 just to piss off


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



Re: ajax autocomplete.

2006-06-22 Thread nate

FYI, charsetTag is deprecated, use charset.


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



Re: ajax autocomplete.

2006-06-21 Thread momo

Just wanted to say thanks for all the posts especially Carlos and
Spynes...

I finally got this working.

The only thing I needed to add to carlos' posts was this in my default
layout:

charsetTag('UTF-8') ?>
link('prototype') ?>
link('controls') ?>
link('scriptaculous.js?load=effects') ?>

Also, in firefox, I found it useful to use The "Miscellaneous->Show
Hidden Elements" in the web developer toolbar.  Even after all of this,
I had some SQL errors.  This kept the Div Element set to hidden, even
though it was populated with some SQL text that I needed to see.
Showing the Hidden elements let me know that the autocomplete was
working, which felt frickin great.


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



Re: ajax autocomplete.

2006-06-19 Thread nate

Yes, this assumes you have the Prototype and script.aculo.us libraries
included in your page layout.


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



Re: ajax autocomplete.

2006-06-19 Thread spynes

It works fine!
but I had to add the control library to the layout:
link('controls') ?>
it was because a javascript error:
Ajax.Autocompleter is not a constructor


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



Re: ajax autocomplete.

2006-06-16 Thread nate

It's an example.  The example assumes that you have a model called
'Company' with a field called 'name'.


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



Re: ajax autocomplete.

2006-06-16 Thread % Didac

Unas bromitas con los amigos.

-Un  escaneador de puertos ( no hace falta que sea muy potente )
-una lista con los logins & passwords, de los routers mas standars
-Llamadas locales gratis gracias a timofonica y su servicio Adsl ( es
que si tienes adsl las llamadas son gratuitas )

Escaneamos los puertos 21,23,80 ( vienen abiertos de serie casi siempre
y van bien para identificar el router )

Tambien escanearemos el puerto 4661 o 4662 es de la mula o programa
P2P, es el que mas me mola pero podeis hacerlo con otros


ahora vamos probando a los router que encontramos los passwords &
logins algunos ni tienen y la mayoria el 60% tienen el que viene de
serie


Pues ahora establecemos conexion por el navegador con el router y
metemos logins&ppass defaults

En la mayoria de router al mirar la conexion ppp nos sale delante de la
conexion el telefono o la linea a la cual es isp asigna la ip (vamos
que esta el telefono del tipo al cual le tenemos el router controlao )

ahora bien hemos observado que tiene el p2p (emule) activo, pues le
llamamos a casa y le decimos que somos del cuerpo nacional de delitos
informaticos y que hemos logeado sus descargas ilegales

le decimos que la llamada es simplemente para avisar de que le vamos a
cortar la linea por peticion de un juez ( es que la mayoria empiezan a
llorar y decir que no se descargan nada )
proseguimos con la broma, posteriormente a esto hemos cambiado por
supuesto la clave del router y el no podra entrar, asi que con
desactivarle la adsl el tipo se cagara

y le decimos eso, pues nada cortamos la linea por peticion del juez y
en breves se pasaran a por la maquina para hacerla servir de pruebas en
el juicio

http://www.DidbiT.info


--~--~-~--~~~---~--~~
Ha recibido este mensaje porque está suscrito a Grupos de Google "Cake PHP" 
grupo.
 Si quiere publicar en este grupo, mande un correo electrónico a 
cake-php@googlegroups.com
 Para anular la suscripción a este grupo, envíe un mensaje a [EMAIL PROTECTED]
 Para visualizar más opciones, visite este grupo 
enhttp://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ajax autocomplete.

2006-06-16 Thread Jf

ok, there are no erreor message
but whan I write something in the field, nothing append

has what correspont Company  and Name
What contains Company/name ?

autocomplete('Company/name'); ?>

Ref :
http://cakebaker.wordpress.com/2006/06/06/autocompletion-the-easy-way/


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



Re: ajax autocomplete.

2006-06-16 Thread nate

You have to include the prototype and script.aculo.us libraries in the
header of your page.


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



Re: ajax autocomplete.

2006-06-16 Thread Jf

with "autocompletion-the-easy-way/ "
I have this erro message :

Erreur : Ajax.Autocompleter is not a constructor
Fichier source : http://localhost/cake/index.php/types/
Ligne : 60

My ligne 60 :

new Ajax.Autocompleter('Type_name',
'Type_name_autoComplete', '/cake/index.php//types/',
{asynchronous:true, evalScripts:true});

can you help me .

Merci


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



Re: ajax autocomplete.

2006-06-15 Thread nate

I sound like a student??

You sound like a dumbass.

Open source software has the benefit of being reviewed and improved by
the entire community that utilizes it, versus proprietary code (i.e.
yours), which is obfuscated to hide how crappy it is.

It's obvious from the screencasts you posted that you slowed down the
videos of your competition's demos to make yourself look better.


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



Re: ajax autocomplete.

2006-06-15 Thread Larry E. Masters aka PhpNut
Please do research before assuming Open source is free for all.And I do consider your email spam and I am sure google will to since I already forwarded you multiple postings to other groups to them for review. And banned you from this group all together.
-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public*/ 

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


Re: ajax autocomplete.

2006-06-15 Thread Cheng Guangnan

I came here to let more people know about the product, let people to
open source and free library doesn't always reliable, even it's
popular like scriptaculous, even it produced by large company such as
Yahoo.

I dont know Cake PHP is the name of a framework before,it seem is a
PHP community.

If this product is open source and it's free, you won't consider it as
a spam. I think here is so money sensitive, but less time sensitive
and risk sensitive.

On 6/15/06, Larry E. Masters aka PhpNut <[EMAIL PROTECTED]> wrote:
>
> chenggn,
>
> Did you join this list just to send a spam email selling you product?
> Seems like this is the case since you have one email to this group dated Jun 
> 17 which is the day you joined.
>
> And prior to that you spamed others.
> http://groups.google.com/groups/search?q=author:[EMAIL PROTECTED]
>
> --
> /**
> * @author Larry E. Masters
> * @var string $userName
> * @param string $realName
> * @returns string aka PhpNut
> * @access  public
> */
>  >
>



-- 
Cheng Guangnan

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



Re: ajax autocomplete.

2006-06-15 Thread Larry E. Masters aka PhpNut
chenggn,Did you join this list just to send a spam email selling you product?Seems like this is the case since you have one email to this group dated Jun 17 which is the day you joined.And prior to that you spamed others.
http://groups.google.com/groups/search?q=author:[EMAIL PROTECTED]-- /*** @author Larry E. Masters* @var string $userName
* @param string $realName* @returns string aka PhpNut* @access  public*/ 

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


Re: ajax autocomplete.

2006-06-15 Thread Larry E. Masters aka PhpNut
19 releases since moving the downloads to cakeforge. Prior to that I did not keep track.If you want to count downloads instead of release there have been 33,309 as of this email and since Jan 1, 2006 when I moved it to cakeforge site.
Now if your last email are being sent to be an ass I can remove you from this list all together. I have had little sleep working on this latest release and someone trying to profit here is not what this list is about.
33,311 before I was finished writing this-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public*/
On 6/15/06, chenggn <[EMAIL PROTECTED]> wrote:
WatLarry Masters, hold on pleaseI'm still counting how many release you have done...:)

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


Re: ajax autocomplete.

2006-06-15 Thread chenggn

WatLarry Masters, hold on please

I'm still counting how many release you have done...

:)


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



Re: ajax autocomplete.

2006-06-15 Thread Larry E. Masters aka PhpNut
Better pay $50 for each version of CakePHP I release.
That should have read:Better then donating, pay $50 for each version of CakePHP I release. -- /*** @author Larry E. Masters* @var string $userName* @param string $realName
* @returns string aka PhpNut* @access  public*/ 

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


Re: ajax autocomplete.

2006-06-15 Thread Larry E. Masters aka PhpNut
chenggn,Donate a portion of the profits you make spamming this list to the foundation to help continue the development of CakePHP.Otherwise prepare to be removed from this list if it happens again.Better pay $50 for each version of CakePHP I release.
-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public*/On 6/15/06, 
chenggn <[EMAIL PROTECTED]> wrote:
Sorry I forgot the screencasthttp://capxous.com/screencast/scriptaculous/Not only scriptaculous , also Yahoo UI
http://capxous.com/screencast/yahoo/

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


Re: ajax autocomplete.

2006-06-15 Thread chenggn

Sorry I forgot the screencast

http://capxous.com/screencast/scriptaculous/

Not only scriptaculous , also Yahoo UI

http://capxous.com/screencast/yahoo/

RosSoft wrote:
> I really need that you explains better why your solution is best,
> because I don't find any bad thing in scriptaculous demo autocompleter,
> do you?


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



Re: ajax autocomplete.

2006-06-15 Thread RosSoft

I really need that you explains better why your solution is best,
because I don't find any bad thing in scriptaculous demo autocompleter,
do you?


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



Re: ajax autocomplete.

2006-06-14 Thread chenggn

Somebody challenge me why they should pay $50 as they have free
alternative

you will know why from this screencast.

This is not a screencast of my demo!
it's a popular open source project script.aculo.us

This is a 180kb flash movie.

http://demo.script.aculo.us/ajax/autocompleter


nate wrote:
> Look, I realize you're just some idiot trying to advertise his wanna-be
> "Web 2.0" product, but seriously, are you retarded??
>
> Why would anyone pay $50 for something you can get for free with less
> effort?


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



Re: ajax autocomplete.

2006-06-14 Thread chenggn

Some body more care about time cost, learing cost, traing cost.

Some body just want get thing done quickly.

Do you know the race-rondiction issue in autocomplete?

You want type "hello world"

Depend on your typing speed, two requests was send to the server

(1) request "/?q=hell"

(2) request "/?q=hello w"

But second request returned first !

I didn't see any tutorial mentioned this issue.

I have tried script.aculo.us, and Yahoo UI AutoComplete, they just not
great as CAPXOUS.

Try their demo http://demo.script.aculo.us/ajax/autocompleter

try type "hell", after the popup come out continue type to "hello w",
see how idiot it is.

Nobody take resposnbility to the quality of those open source project,
they just ann "We have autocomplete! use us!", they never told you the
detail.

"Why would anyone pay $50 for something you can get for free with less
effort? "
So you mean oracle, bea, JIRA should just close the door?

I dont know are you still a student, or real application developer, but
your sound like a student.


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



Re: ajax autocomplete.

2006-06-14 Thread nate

Look, I realize you're just some idiot trying to advertise his wanna-be
"Web 2.0" product, but seriously, are you retarded??

Why would anyone pay $50 for something you can get for free with less
effort?


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



Re: ajax autocomplete.

2006-06-14 Thread chenggn

If you would like pay $50, http://capxous.com

Carlos Mauricio Samour wrote:
> Has anyone got the $ajax->autocomplete working?
> If so what did you do?
> I followed the example on the manual but when I type anything on the
> input box it does not return anything.


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



Re: ajax autocomplete.

2006-06-09 Thread stefano

Nooo... _SO_ easy!?!?

You are a genius!!!

Stefano


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



Re: ajax autocomplete.

2006-06-09 Thread nate

http://cakebaker.wordpress.com/2006/06/06/autocompletion-the-easy-way/


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



Re: ajax autocomplete.

2006-06-09 Thread stefano

Nate,
how can I use it?
How I heve to call it from my views?
I have quite a few autocomplete fields and your component could help a
lot!
It's look like, for me, is the moment to learn about components...
isn't it? ;-)

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



Re: ajax autocomplete.

2006-06-06 Thread nate

The class defaults to 'auto_complete' so that it works by default with
the CSS code in the manual:



div.auto_complete {
position :absolute;
width:250px;
background-color :white;
border   :1px solid #888;
margin   :0px;
padding  :0px;
}

li.selected { background-color: #ffb; }



Also, I wrote a small component to handle autocomplete requests, so
that they don't require an action or view.  You can get it here:
http://cakeforge.org/snippet/detail.php?type=snippet&id=70


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



Re: ajax autocomplete.

2006-06-05 Thread Jules


Jf wrote:
> >
> > Hope it helps someone else.
> > >
>
> Yes me ! :-)


Great !! It works now for me.
Just to add some "cherry" on top of the cake :
It is possible to modify the classname of the generated div.
So if you do not want ot have class="autocomplete" in the generated
form simply do :

autoComplete('Post/title','/posts/autocomplete',array('class'=>'searchpost'))
?>

This will force the autocomplete to generate a 
This could be handy if you want different css style for different
autocomplete search result ;-)
and again : thank you so much for the tip !


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



Re: ajax autocomplete.

2006-06-01 Thread Jf

> 
> Hope it helps someone else.
> >

Yes me ! :-)


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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

I got it finally working. It was the layout I think.

I modifiend the method inside my controller.
function autocomplete ()
{
$this->layout = "ajax"; // This is probably wy it was not 
working.
if(empty($this->params['data']))
{
echo "DaTA EMPTY";
}else{

$this->set('productos',
$this->Producto->findAll(
"descripcion LIKE '%{$this->data['Producto']['descripcion']}%'")
);

}


The autocomplete.thtml looks like this.










And the view that uses the autocomplete.thtml called searchname.thtml
looks like this


autoComplete('Producto/descripcion',
'/productos/autocomplete')?>
submit('View Post')?>

Hope it helps someone else.


On 6/1/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote:
> I even hardcoded de list in my autocomplete.thtml to see if is my controller.
>
> 
> 
> PANTALON CASUAL DE VESTIR   
> 
> PANTALON JEANS ADOBE
> 
> CAMISA DE BEBE PAYASITO 
>
> 
> CAMISA DE BEBE PAYASITO rayado  
> 
>
> And still retuns nothign.
> On 6/1/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote:
> > I know it susck! :(
> >
> > On 6/1/06, Jf <[EMAIL PROTECTED]> wrote:
> > >
> > > I have the same problem,
> > >
> > > nothing appear, no javascript error
> > > the pr($this->data); return too nothing
> > >
> > >
> > > > > >
> > >
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

I even hardcoded de list in my autocomplete.thtml to see if is my controller.



PANTALON CASUAL DE VESTIR   

PANTALON JEANS ADOBE

CAMISA DE BEBE PAYASITO 


CAMISA DE BEBE PAYASITO rayado  


And still retuns nothign.
On 6/1/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote:
> I know it susck! :(
>
> On 6/1/06, Jf <[EMAIL PROTECTED]> wrote:
> >
> > I have the same problem,
> >
> > nothing appear, no javascript error
> > the pr($this->data); return too nothing
> >
> >
> > > >
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

I know it susck! :(

On 6/1/06, Jf <[EMAIL PROTECTED]> wrote:
>
> I have the same problem,
>
> nothing appear, no javascript error
> the pr($this->data); return too nothing
>
>
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread Jf

I have the same problem,

nothing appear, no javascript error
the pr($this->data); return too nothing


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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

Can some one post a working example somewere?
I know I am doing something wrong but I just can't see what.
The other problem is that my ajax experiance is close to 0.
Well I guess I will have to develop a solution with out the autocomplete helper.

On 6/1/06, nate <[EMAIL PROTECTED]> wrote:
>
> Try adding pr($this->data); to your autocomplete action, to see what
> data is being posted.
>
>
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread nate

Try adding pr($this->data); to your autocomplete action, to see what
data is being posted.


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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

If I type this address on my browser :
http://localhost/productos/autocomplete/BEBE

I doesnot return any thinkg.
The SQL in the debug mode 2 tells me this

SELECT `Producto`.`id`, `Producto`.`linea_id`, `Producto`.`unidad_id`,
`Producto`.`plu`, `Producto`.`descripcion`, `Producto`.`costo`,
`Producto`.`porcentage`, `Producto`.`precio_lista`,
`Producto`.`created`, `Producto`.`modified`, `Producto`.`estaactivo`,
`Linea`.`id`, `Linea`.`nombre`, `Linea`.`estaactivo`, `Unidad`.`id`,
`Unidad`.`nombre`, `Unidad`.`factor`, `Unidad`.`estaactivo` FROM
`productos` AS `Producto` LEFT JOIN `lineas` AS `Linea` ON
`Producto`.`linea_id` = `Linea`.`id` LEFT JOIN `unidads` AS `Unidad`
ON `Producto`.`unidad_id` = `Unidad`.`id` WHERE descripcion LIKE ''


There is nothing after the LIKE.

This is my controller againg.
class ProductosController extends AppController
{
var $name = 'Productos'; // required for PHP4 installs
var $helpers = array('Html', 'Javascript', 'Ajax');
var $scaffold;
var $uses = array('Producto');

function autocomplete ()
{
$this->set('productos',
$this->Producto->findAll(
"descripcion LIKE '{$this->data['Producto']['descripcion']}'")
);
//$this->Producto->findAll("descripcion LIKE ''");
$this->layout = "ajax";

}
}

Does it have to return anthing If I call the address myself?



On 6/1/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote:
> My bad the ajax-autocomplete is working  If I type something I can see
> the page doing a reloading but It is not returning any data.
> I wonder if my controller is set up correclty. Or I am calling the right view.
>
>
> On 6/1/06, nate <[EMAIL PROTECTED]> wrote:
> >
> > Well, if you added 'Javascript' to the list of helpers in your
> > controller, but the $javascript helper variable is not set, that means
> > Cake is throwing an error of some kind, usually related to it not being
> > able to find something.
> >
> >
> > > >
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

My bad the ajax-autocomplete is working  If I type something I can see
the page doing a reloading but It is not returning any data.
I wonder if my controller is set up correclty. Or I am calling the right view.


On 6/1/06, nate <[EMAIL PROTECTED]> wrote:
>
> Well, if you added 'Javascript' to the list of helpers in your
> controller, but the $javascript helper variable is not set, that means
> Cake is throwing an error of some kind, usually related to it not being
> able to find something.
>
>
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread nate

Well, if you added 'Javascript' to the list of helpers in your
controller, but the $javascript helper variable is not set, that means
Cake is throwing an error of some kind, usually related to it not being
able to find something.


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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

On 6/1/06, nate <[EMAIL PROTECTED]> wrote:
>
> First of all, I assume the second view is not also called
> autocomplete.thtml.

Actualy the second view is calles diferent.   is called searchname.thtml


Second, the first thing I would check is the
> source code of the page, and see if the title says "Missing..."
> anything.  It's possible that there is an error (missing model, missing
> view, etc.) that is preventing your page from rendering.

I am not getting any erros. not on the j console nor the page source.
>
>
> >
>

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



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

well what I did was set up like this in the layout default.thtml
link('prototype'); }
?>
link('scriptaculous.js?load=effects'); }
?>
link('controls'); }
?>

Now I think with this it loads them dinamicly only if I have setup the
helper on my controller.
But it still does return any data when I type something in the
$ajax->autocomplete view.


On 6/1/06, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote:
>
> Just do something like this in your layout:
>
> 
> 
>
> If that doesn't seem to help, you'll need to try to see if any JS
> errors are being generated. Firefox as a pretty nice JS console you
> can use to see the errors. If you're getting some, provide them here.
>
> -- John
>
>
> On Jun 1, 2006, at 10:53 AM, Carlos Mauricio Samour wrote:
>
> >
> > No this is what I am doing.
> > First I create the autocomplete function inside my controller.
> > < -- file app/controllers/productos_controller.php ->
> >  > class ProductosController extends AppController
> > {
> >   var $name = 'Productos'; // required for PHP4 installs
> >   var $helpers = array('Html', 'Javascript', 'Ajax');
> >   var $scaffold;
> >
> >   function autocomplete ()
> >   {
> > $this->set('productos',
> > $this->Producto->findAll(
> > "descripcion LIKE '{this->data['Producto']
> > ['descripcion']}'")
> > );
> > $this->layout = "ajax";
> >   }
> >
> > }
> > ?>
> >
> > 2- I created a view for this function in :
> > <--  apps/views/productos/autocomplete.thtml-->
> >
> > 
> >   
> >   
> >   
> >   
> >   
> > 
> >
> > 3 - I created another view that uses the ajax autocomplete helper in
> > <--  apps/views/productos/autocomplete.thtml-->
> >
> > link('prototype') ?>
> > link('scriptaculous.js?load=effects') ?>
> >  link('controls') ?>
> > 
> >  >   $ajax->autoComplete('Producto/descripcion', '/productos/
> > autocomplete')?>
> > submit('View Post')?>
> > 
> >
> > Ok one note about this view. I have to setup the $javascript libraries
> > here because if I try to setup those in my
> > apps/view/layout/default.thtml it gives me this error anywere in the
> > site.
> > Notice: Undefined variable: javascript in
> > /home/msamour/web/framework/concentrador/cake/app/views/layouts/
> > default.thtml
> > on line 20
> >
> > Fatal error: Call to a member function link() on a non-object in
> > /home/msamour/web/framework/concentrador/cake/app/views/layouts/
> > default.thtml
> > on line 20
> >
> > Can this be my problem? I am not using the layouts proprerly?.
> > Thanks for the 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
-~--~~~~--~~--~--~---



Re: ajax autocomplete.

2006-06-01 Thread nate

First of all, I assume the second view is not also called
autocomplete.thtml.  Second, the first thing I would check is the
source code of the page, and see if the title says "Missing..."
anything.  It's possible that there is an error (missing model, missing
view, etc.) that is preventing your page from rendering.


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



Re: ajax autocomplete.

2006-06-01 Thread John David Anderson (_psychic_)

Just do something like this in your layout:




If that doesn't seem to help, you'll need to try to see if any JS  
errors are being generated. Firefox as a pretty nice JS console you  
can use to see the errors. If you're getting some, provide them here.

-- John


On Jun 1, 2006, at 10:53 AM, Carlos Mauricio Samour wrote:

>
> No this is what I am doing.
> First I create the autocomplete function inside my controller.
> < -- file app/controllers/productos_controller.php ->
>  class ProductosController extends AppController
> {
>   var $name = 'Productos'; // required for PHP4 installs
>   var $helpers = array('Html', 'Javascript', 'Ajax');
>   var $scaffold;
>   
>   function autocomplete ()
>   {
> $this->set('productos',
> $this->Producto->findAll(
> "descripcion LIKE '{this->data['Producto'] 
> ['descripcion']}'")
> );
> $this->layout = "ajax";
>   }
>   
> }
> ?>
>
> 2- I created a view for this function in :
> <--  apps/views/productos/autocomplete.thtml-->
>
> 
>   
>   
>   
>   
>   
> 
>
> 3 - I created another view that uses the ajax autocomplete helper in
> <--  apps/views/productos/autocomplete.thtml-->
>
> link('prototype') ?>
> link('scriptaculous.js?load=effects') ?>
>  link('controls') ?>
> 
>$ajax->autoComplete('Producto/descripcion', '/productos/ 
> autocomplete')?>
> submit('View Post')?>
> 
>
> Ok one note about this view. I have to setup the $javascript libraries
> here because if I try to setup those in my
> apps/view/layout/default.thtml it gives me this error anywere in the
> site.
> Notice: Undefined variable: javascript in
> /home/msamour/web/framework/concentrador/cake/app/views/layouts/ 
> default.thtml
> on line 20
>
> Fatal error: Call to a member function link() on a non-object in
> /home/msamour/web/framework/concentrador/cake/app/views/layouts/ 
> default.thtml
> on line 20
>
> Can this be my problem? I am not using the layouts proprerly?.
> Thanks for the 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
-~--~~~~--~~--~--~---



Re: ajax autocomplete.

2006-06-01 Thread Carlos Mauricio Samour

No this is what I am doing.
First I create the autocomplete function inside my controller.
< -- file app/controllers/productos_controller.php ->
set('productos',
$this->Producto->findAll(
"descripcion LIKE '{this->data['Producto']['descripcion']}'")
);
$this->layout = "ajax";
}

}
?>

2- I created a view for this function in :
<--  apps/views/productos/autocomplete.thtml-->









3 - I created another view that uses the ajax autocomplete helper in
<--  apps/views/productos/autocomplete.thtml-->

link('prototype') ?>
link('scriptaculous.js?load=effects') ?>
 link('controls') ?>

autoComplete('Producto/descripcion', '/productos/autocomplete')?>
submit('View Post')?>


Ok one note about this view. I have to setup the $javascript libraries
here because if I try to setup those in my
apps/view/layout/default.thtml it gives me this error anywere in the
site.
Notice: Undefined variable: javascript in
/home/msamour/web/framework/concentrador/cake/app/views/layouts/default.thtml
on line 20

Fatal error: Call to a member function link() on a non-object in
/home/msamour/web/framework/concentrador/cake/app/views/layouts/default.thtml
on line 20

Can this be my problem? I am not using the layouts proprerly?.
Thanks for the 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
-~--~~~~--~~--~--~---



Re: ajax autocomplete.

2006-06-01 Thread John David Anderson (_psychic_)

I'm using it, and it works great...

Sure you have your scriptaculous and prototype libraries included in  
your layout?

Does a JS console reveal any errors?

-- John

On Jun 1, 2006, at 9:56 AM, Carlos Mauricio Samour wrote:

>
> Has anyone got the $ajax->autocomplete working?
> If so what did you do?
> I followed the example on the manual but when I type anything on the
> input box it does not return anything.
>
> >


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