');
echo $this-Form-input('token_separador');
echo $this-Form-input('Tabla_Correspondiente',
array('options' =
$campos, 'empty'='--Seleccionar--'));
?
?php
echo $ajax-observeField( 'ArchivosSistemaTokenSeparador',
array('url' = array( 'action
');
echo $this-Form-input('Tabla_Correspondiente',
array('options' =
$campos, 'empty'='--Seleccionar--'));
?
?php
echo $ajax-observeField( 'ArchivosSistemaTokenSeparador',
array('url' = array( 'action' = 'myfunction' ), 'frequency' =
0.1,));
/fieldset
?php echo $this-Form-end
',
array('label' = 'VAT',
'value' = isset($this-data['Test']['vatnumber']) ? $this-
data['Test']['vatnumber'] : '' ));
$options = array('url' = 'update_value', 'update' =
'TestVatnumber');
echo $ajax-observeField('TestClientId', $options );
?
... /tests/ajax_value.ctp
This is really more of a javascript question- have whatever ajax
function you are using
On Aug 26, 10:59 pm, Louie Miranda lmira...@gmail.com wrote:
Anyone?
--
Louie Miranda
- Email: lmira...@gmail.com
- Web:http://www.louiemiranda.com
On Thu, Aug 26, 2010 at 2:37 PM, Louie Miranda
I am trying to get ajax to work on my username field to check if the account
is taken or not using this function.
http://bin.cakephp.org/view/1632401399
The function works. And the view/register.ctp (below)
http://bin.cakephp.org/view/258044293
Works too, I debug using Firebug.
I am just
Anyone?
--
Louie Miranda
- Email: lmira...@gmail.com
- Web: http://www.louiemiranda.com
On Thu, Aug 26, 2010 at 2:37 PM, Louie Miranda lmira...@gmail.com wrote:
I am trying to get ajax to work on my username field to check if the
account is taken or not using this function.
', array('id'='docnum'));
$ajax-observeField('document',array('url'='populate_document_select','update'='docnum'));
echo
$ajax-observeField('document',array('url'='populate_document_select','update'='docnum'));
echo $form-end('Save');
?
DocumentsController
function
?
echo $form-create('');
echo
$form-select('document_type_id',array($docTypes),null,array('id'='document'),true);
//this form field will output the recent document number
echo $form-input('document_number', array('id'='docnum'));
echo
$ajax-observeField('document
-observeField('document',array('url'='populate_document_select','update'='docnum'));
echo
$ajax-observeField('document',array('url'='populate_document_select','update'='docnum'));
echo $form-end('Save');
?
DocumentsController
function populate_document_select() {
if(!empty
wrote should be like this, but it still doesn't work
test_ajax.ctp
?
echo $form-create('');
echo
$form-select('document_type_id',array($docTypes),null,array('id'='document'),true);
echo $form-input('document_number', array('id'='docnum'));
$ajax-observeField('document
will output the recent document number
echo $form-input('document_number', array('id'='docnum'));
echo
$ajax-observeField('document',array('url'='populate_document_select','update'='docnum'));
echo $form-end('Save');
?
DocumentsController
function test_ajax
Hi,
I am migrating from 1.2 to cakephp 1.3 and am trying to
switch to the new JsHelper (engine JQuery)
anybody an idea how to easily replace the deprecated $ajax-observeField
with the new $js- functionality ? e.g. for the example in
http://book.cakephp.org/view/630/observeField
?php echo $form
I'm attempting to replace the contents of a div, stupidtest, using
ajax-observeField. The event is observed, the post occurs, but the
contents of the div are simply destroyed. The same arguments sent to
ajax-link work correctly.
In other words, the second line clears the div contents
You were right. It didn't even cross my mind to look for a user written
helper. Found one, and it works! Thanks!
Marcelo Andrade wrote:
On Tue, Oct 13, 2009 at 4:28 PM, hahmadi82 hahmad...@gmail.com wrote:
If anyone could help with this it would be much appreciated.
I'm not a
On Tue, Oct 13, 2009 at 4:28 PM, hahmadi82 hahmad...@gmail.com wrote:
If anyone could help with this it would be much appreciated.
I'm not a jQuery expert, but it's not so hard do accompplish that.
I guess making the appropriate ajax call from a .onchange() event
should do the trick.
If I'm
If anyone could help with this it would be much appreciated.
hahmadi82 wrote:
Can someone please post the jquery equivalent of:
echo $ajax-observeField('makes',array('url' = 'update_select', 'update'
= 'years'));
I'm trying to replace all prototype-dependent code with jquery
Can someone please post the jquery equivalent of:
echo $ajax-observeField('makes',array('url' = 'update_select', 'update' =
'years'));
I'm trying to replace all prototype-dependent code with jquery...
--
View this message in context:
http://www.nabble.com/jquery-substitute-for-ajax
Been a while since I did this but as CakePHP uses the id of each
record as the key I think I did
$array[0] = 'value';
ksort($array);
Should work as you can't have a primary key of 0 so it should always
sort to first, actually this would mess with an array sorted by a-z
values.
Ok, how about
As brian states you add the blank entry to the arrays that you pass
from the controller to the view.
So the $states, $counties and $cities arrays need to include the blank
'Please select ...' options as their first row.
--~--~-~--~~~---~--~~
You received this
I understand. That is what I would like to do; have the first row be
'Please select...' so that the observeField 'sees' a change in the
field.
I am just not sure how to push an entry into element 0 of an array
that has already been loaded by a find('List'), and thereby pushing
all the other
doesn't work:
echo $ajax-observeField('district_name',
array( 'url'= array( 'controller' = 'regions', 'action'
='update_select' ),
'update'='test',
'onChange'=true));
The response from the server is emty.
Hope somebody can help me :)
Thanks
Justin
In case you miss the other thread: you need to call set() before
rendering the view because the view's copy of the variable is not
changed otherwise.
On Sun, Aug 30, 2009 at 9:33 AM, FrederickDmanzanillo.engl...@gmail.com wrote:
I understand. That is what I would like to do; have the first row
I think I solved my problem referenced on this thread. The solution
proposed with the array_unshift scrambled the data inside the
dropdown. The names were still sorted properly, but the id number with
that name got resequenced. Apparently that is what array_unshift does
for you, according to the
-box-t29.html.
They work great... mostly. I have added to the code in the add.ctp
file to include an 'empty' element of 'Please select a [whatever]'. So
all three combo boxes start out with the first value being 'Please
select a [whatever]'.
The user selects a state. The $ajax-observeField
-observeField on the state combo
box fires and loads the county combo box. This loses the initial
'Please select a [whatever] and displays the first entry in the list
of counties for the selected state.
Even if the user opens the county combo box and selects the first
entry, the $ajax-observeField
value being 'Please
select a [whatever]'.
The user selects a state. The $ajax-observeField on the state combo
box fires and loads the county combo box. This loses the initial
'Please select a [whatever] and displays the first entry in the list
of counties for the selected state.
Even
I am not so sure if this is the right way, but you can use another
$ajax-submit button to call your function along with the submited
data. Then in your action You will have access to the submited data in
$this-data. But if You use the $ajax-link, then You can specify the
parameters in the url
Hello Everyone,
I have dynamic listing of some categories and on click on each of
them, I want to show related user listing.
I want to use Ajax for this and have to pass category id to that ajax
function.
I have tried remoteFunction() for this, but I did not get how to send
category id to that
'
='valid_username');
echo $ajax-observeField('login_name',$options);
?
This is working properly and showing me error message Username
already exist in valid_username div
but I need, at the same time the login_name text box should be clear
and got focus in that.
Does anyone have some idea?
-Manisha
'='popularlist','empty'='All'));
echo $ajax-observeField('popularlist',
array('with'='Form.Element.serialize(\'popularlist\')','url'='popular_firms','update'='popular_info','complete'=Effect.Appear('popularlist');,'onChange'=true));
echo $form-end();
On Mon, Mar 16, 2009 at 4:54 PM, Manisha P
Hello All,
I am using $ajax-observeField()
It is showing me error 'Form is not defined' in javascript console.
Does anyone has some solution for this?
Thanks in advance
Manisha.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
' = '10'
);
$options['condition'] = 'ifUsernameHasChanged()';
$ajax-observeField('username', $options);
?[code]
thx
Aurelius
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group
'='users','action'='getAJAX', $user
['User']['id']),
'before' = 'startLoading()',
'complete' = 'endLoading()',
'failure' = 'failure()',
'frequency' = '10'
);
$options['condition'] = 'ifUsernameHasChanged()';
$ajax-observeField('username', $options);
?[code]
thx
I am having problems with ajax observeField on a checkbox thats not
working in IE7. It works fine in firefox, and safari. I have run
Fiddler HTTP Proxy on my windows machine to see whether a request was
being made when I clicked the checkbox and it appears that nothing is
happening. I am running
I am having problems with ajax observeField on a checkbox thats not
working in IE7. It works fine in firefox, and safari. I have run
Fiddler HTTP Proxy on my windows machine to see whether a request was
being made when I clicked the checkbox and it appears that nothing is
happening. I am running
http://bin.cakephp.org/saved/38610
I'm having real trouble with $ajax-observeField. I have a form that
has a product category, product group, and then product size. Product
group is dependent on product category so I have an observeField on
Product Category. This triggers an action, which works
having real trouble with $ajax-observeField. I have a form that
has a product category, product group, and then product size. Product
group is dependent on product category so I have an observeField on
Product Category. This triggers an action, which works. Next, Product
Size is dependent
);
$options = array('url' = '/contacts/view/', 'update' =
'contactinfo');
echo $ajax-observeField('ContactID',$options);
how can I access the value of the selected object in the form field?
I'm absolutely stumped, I can't figure it out.
$this-params['form
I'm continuing to refactor code with 1.2RC2 and latest cake learnings!
I've got an $ajax-observeField(...) working nicely watching a select list.
When the
option changes, a more lengthy description is dynamically updated into a div
on the page to help the user.
But... when you first load
hmm, think i will need to sticj to prototype then..
On May 8, 12:07 pm, b logica [EMAIL PROTECTED] wrote:
If you're not too attached to Prototype you could have a look at liveQuery:
http://docs.jquery.com/Plugins/livequery
Of course, you then lose all the ajax helper functionality.
On
Maybe using jQuery, you can use jQuery AND prototype on same
application.
hth
On May 16, 8:12 am, AussieFreelancer [EMAIL PROTECTED]
wrote:
hmm, think i will need to sticj to prototype then..
On May 8, 12:07 pm, b logica [EMAIL PROTECTED] wrote:
If you're not too attached to Prototype
I dont know anything about jquery though :( are there any tutorials
for this kind of thing?
Thanks
Patrick
On May 16, 2:28 pm, francky06l [EMAIL PROTECTED] wrote:
Maybe using jQuery, you can use jQuery AND prototype on same
application.
hth
On May 16, 8:12 am, AussieFreelancer [EMAIL
Hi, is it possible to use the ajax observefield in 1.1 to create
dynamic selects? I figured this could be quite a handy way to achieve
chained selects, but it seems like you can only display the returned
value in a div, is that right?
If it is not possible to generate dynamic selects using ajax
If you're not too attached to Prototype you could have a look at liveQuery:
http://docs.jquery.com/Plugins/livequery
Of course, you then lose all the ajax helper functionality.
On Wed, May 7, 2008 at 8:31 PM, AussieFreelancer
[EMAIL PROTECTED] wrote:
Hi, is it possible to use the ajax
Chris Hartjes wrote:
D'oh -- that stuff I posted is Cake 1.2 specific.
I don't use Cake 1.1 at all, so can't help you there.
Ok Chris but you gave me a hint. So searching in the core code
(session.php) I saw three points where Session.checkAgent is
present. The only way I found (puttin some
Hello everybody
I'm trying to use the method in subject with no result. CakePHP
1.1.18.
The PHP code in thtml is:
...
echo $html-input(Project/name,array(maxlength=50,class=));
...
echo $ajax-observeField(
ProjectName,
array(
update=web
Davide wrote:
...
everything works except that it's returned to me that is missing
argument 1 for the controller action.
Solved at moment making the function argument as optional and testing
for the existence of $this-data[Project][name]
thank and bye
davide
--
Live life like you're gonna
A strange thing regarding this topic.
I can't understand where's the problem.
Everytime I call the method with the observeField, all my Session data
is lost and so I'm disconnected.
It's the first time I'm using Ajax+AjaxHelper+Cake, so I could do
something wrong.
When I remove the
On Wed, Apr 23, 2008 at 11:37 AM, Davide [EMAIL PROTECTED] wrote:
A strange thing regarding this topic.
I can't understand where's the problem.
Everytime I call the method with the observeField, all my Session data
is lost and so I'm disconnected.
You might have to change some stuff
Chris Hartjes wrote:
You might have to change some stuff in your config/core.php file.
Look for Session.checkAgent
Often you have do
Configure::write('Session.checkAgent', false);
to preserve sessions when using Ajax
Session.checkAgent is not defined in my core.php. I tried defining it
On Wed, Apr 23, 2008 at 11:52 AM, Davide [EMAIL PROTECTED] wrote:
Some other ideas? Cake version 1.1.18.
D'oh -- that stuff I posted is Cake 1.2 specific.
I don't use Cake 1.1 at all, so can't help you there.
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants
It seems that observeField does not recognize when the value of a
field has been changed by javascript.
It only triggers on manual change.
Is there any way to solve this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I solved the problem. Use magic '$' function, and avoid using ajax to
create the field.
On Jul 5, 11:28 am, minglee [EMAIL PROTECTED] wrote:
I use $Ajax-observeField, with Option['with'='type_id'], however, an
error reported:
Form.Element.Serializers[method] is not a function.
But from
I use $Ajax-observeField, with Option['with'='type_id'], however, an
error reported:
Form.Element.Serializers[method] is not a function.
But from the manual, to use Option['with'] of phpCake Ajax, only need
to call by DOM ID, and in my case 'type_id' is.
What is the problem?
By the way, where can
Is there any way to debug the browser side? How can one find out if
the prototype script is even detecting when the select changes, and
whether it tries to notify the server side? I need to try and find out
where in this control flow things are failing (unfortunately, my js
skills are
Thanks for the reply Chris.
That wasn't the problem though, I cleared out the cache completely,
problem is still occuring.
Any other ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post
...further debugging yields some interesting tidbits...
When debug=2, the 'url' specified in $ajax-observeField() is invoked.
I determined this by having the cake action output a log.
When debug=0, the 'url' specified in $ajax-observeField() is not
getting invoked (no log from the cake action
['Company']['company_name'];
}
echo $html-selectTag('Video/company_id', $companyselect, null,
array('id' = 'company'));
?
/p
p
div id=usersFromCompany/div
/p
?php
echo $ajax-observeField('company', array
Hi Bakers
Sorry I just changed
$this-Vehicule-listedesvehicules(mysql_real_escape_string($params['form']['vehicule_select']));
for
$this-Vehicule-listedesvehicules(mysql_real_escape_string($this-params['form']['vehicule_select']));
AND IT WORKS!
Sten
td
Véhicule input type='text'
ondblclick=document.getElementById('vehicule_select').value='*';
id='vehicule_select' name='vehicule_input' size='10'
?php echo $ajax-observeField('vehicule_select', array('size'='20',
'update'='vehicule_span', 'url'='/tournees/refresh_vehicules',
'frequency'=1
Not yet, thank you Léo, I will.
Have a nice day
Sten
--~--~-~--~~~---~--~~
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,
Did you try an Ajax Autocompleter ? It works fine to replace a select
tag with a very long list.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
',
array('alt'='loupe')); ?
?php echo $html-image('spinner.gif',
array('alt'='Spinner',
'id'='search_spinner', 'style'='display:none;')); ?
/form
?php echo $ajax-observeField('livesearch',
array('update'='select_vehicule', 'url'='refresh_vehicules',
'frequency'=1
You are right :D.
I have 3 select tags (select1, select2 and select3). I want to modify
the content of select2 when I choose an option from select1, and the
same with select2 to select3.
Now i don't use the observeField, I have change it for the following
code:
formulario.thtml
Hi,
with this helper, can I pass any other id value apart of field_id?
I have try the with option but it doesn't work.
Thanks a lot!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to
Gonna have to get some more details. Possibly your code to 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
66 matches
Mail list logo