ajax div update

2007-05-21 Thread pete

hi,
can anyone tell me why updating 2 divs with ajax-link works, but not
with ajax-editor.
basically i want to enter a value for resource_8 and then calculate a
new value for resource_9

thanks

pete

View
?=$ajax-div(resource_8); ??=$ajax-divEnd(resource_8); ?
?=$ajax-div(resource_9); ??=$ajax-divEnd(resource_9); ?

?
//WORKING
php echo $ajax-link('Link', '/myproject/update/8', array('update' =
array('resource_8', 'resource_9'))); ?

?php
//NOT WORKING
echo $ajax-editor('resource_8', '/myproject/update/8', array('update'
= array('resource_8', 'resource_9')));  ?

CONTROLLER
function update()
{
   $this-set('value8', $_POST['value']);
   $this-set('value9', $_POST['value']+1);
   $this-layout = ajax;
}

UPDATE VIEW
?php echo $ajax-div('resource_8'); ?
?php echo $value8; ?
?php echo $ajax-divEnd('resource_8'); ?

?php echo $ajax-div('resource_9); ?
?php echo $value9; ?
?php echo $ajax-divEnd('resource_9'); ?


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



Conditional Ajax div update?

2007-03-18 Thread jefffff

Hello, i'm trying to implement a login system using ajax, but i've
come across a problem.
I want to do it so that when a login is incorrect, then only a small
div below the form is shown with invalid login but when the login is
correct i want to update a different div with the user's account
options.
Any ideas or examples on how can i do this? I'm kind of new to ajax
but looked for examples and it seems all just update one or multiple
divs simultaneously.
Thanks.


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



Ajax Div update doesn't write javascript

2006-12-14 Thread luis_y27

Hello everyone, I have a select box that onchange updates a division
within my page. Inside this division there is some javascript that
should get updated depending on the ajax update.  However, none of my
javascript is being written into the division after the update.  I
looked at the source and there are no script tags to be found.
Everything else gets updated successfully but the javascript.  Anyone
out there knows why this is happening, any help will be greatly
appreciated.


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



Why Ajax-div update 2 divs_No responding

2006-10-27 Thread Eric

Hi everyone,

I used CAKE 1.8 , Uniform Server 3.3, WIN2003, firefox 1.5 and ie 7.0.

I try the fuction about $ajax-link.

I can make the $ajax-link to update single DIv's works perfect either
in FF or IE.

But when I try $ajax-div and $ajax-divEnd, there is no responding at
all.
Can anyone help me to figure it out?
Thanks.

P.S. my code:
tasks_controller.php
   function hello()
{
$this - layout = 'ajax';


}
views/tasks/index.thtml
h3Hello/h3

?= $ajax-link('Update 2 Divs', '/tasks/hello',
array('update' = array( ' first ' ,' second ' ) ) );?

?=$ajax-div('first'); ?
   h1Main Head Updated/h1
?=$ajax-divEnd('first'); ?

?=$ajax-div('second'); ?
   h2Sub head updated/h2
?=$ajax-divEnd('second'); ?

views/tasks/hello.thtml
center HEllo/center


--~--~-~--~~~---~--~~
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: Why Ajax-div update 2 divs_No responding

2006-10-27 Thread Daniel Hofstetter

Do you use version 1.5 of the prototype library? I had some problems
with version 1.4 and updating multiple divs, see
http://cakebaker.42dh.com/2006/08/18/updating-multiple-divs-with-ajax-without-crashing-firefox/

HTH

-- 
Daniel Hofstetter
http://cakebaker.42dh.com


--~--~-~--~~~---~--~~
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: Why Ajax-div update 2 divs_No responding

2006-10-27 Thread Ismael S. Kafeltz

I'm not sure, but in the controller shouldn't be something like this:
$this-render('bla', 'ajax'); - look the 'ajax'


--~--~-~--~~~---~--~~
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: Why Ajax-div update 2 divs_No responding

2006-10-27 Thread Eric

$this - render ('bla' , 'ajax' ) ;

What is the 'bla' ?


--~--~-~--~~~---~--~~
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: Why Ajax-div update 2 divs_No responding

2006-10-27 Thread Eric

ya.
I use the latest verion of scriptaculous-js-1.6.4


--~--~-~--~~~---~--~~
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: Why Ajax-div update 2 divs_No responding

2006-10-27 Thread nate

The 'bla' is the template.  It's for when you want to use a template
that isn't named the same as your action name.

@Ismael: refer to my comment on your duplicate post:
http://groups.google.com/group/cake-php/browse_thread/thread/d4b43f8d7702ee4a/a249f23e462b756c#a249f23e462b756c


--~--~-~--~~~---~--~~
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: Why Ajax-div update 2 divs_No responding

2006-10-27 Thread Eric

Sorry for the duplicate post. I thought it was an error. Cause I havn't
see it update...



nate wrote:
 The 'bla' is the template.  It's for when you want to use a template
 that isn't named the same as your action name.

 @Ismael: refer to my comment on your duplicate post:
 http://groups.google.com/group/cake-php/browse_thread/thread/d4b43f8d7702ee4a/a249f23e462b756c#a249f23e462b756c


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