Re: search only entered fields

2007-07-09 Thread Jeremy David Pointer
Unless someone has a better idea what about: (p.s. didn't test this so read it as pseudo code) foreach ($sonditions as $field=$value ) { if(!empty($value)) $arrconditions[$field]=$value; } findAll($arrconditions, hashkash wrote: Hi! I searched the group for my problem

Re: search only entered fields

2007-07-09 Thread Jeremy David Pointer
Minor corrections below Unless someone has a better idea what about: (p.s. didn't test this so read it as pseudo code) foreach ($sonditions['Equipment'] as $field=$value ) { if(!empty($value)) $arrconditions['Equipment.'.$field]=$value; } findAll($arrconditions, hashkash wrote:

Re: Javascript submit code with Ajax post

2007-06-21 Thread Jeremy David Pointer
I'm not sure I'm getting to where your problem actually is because you haven't told us what is or is not happening. But... 0. I'm using Cake 1.2 so some things might be different 1. I don't see why you would want to redraw the tree, when I do this I set up a div below the tree that's a

Re: Javascript submit code with Ajax post

2007-06-21 Thread Jeremy David Pointer
Jeremy David Pointer wrote: I'm not sure I'm getting to where your problem actually is because you haven't told us what is or is not happening. But... 0. I'm using Cake 1.2 so some things might be different 1. I don't see why you would want to redraw the tree, when I do this I set up

Re: How to update a View-DIV and an element at once with Ajax-Submit-Button?

2007-06-21 Thread Jeremy David Pointer
Simple answer is : it is impossible to update multiple divs with different content with one call to a controller in the way I think you are thing (I have two possible solutions I'll get to shortly) Think about the flow: ajax-submit requests a document or portion of page from the server what

Re: How to update a View-DIV and an element at once with Ajax-Submit-Button?

2007-06-21 Thread Jeremy David Pointer
Chris Hartjes wrote: On 6/21/07, Jeremy David Pointer [EMAIL PROTECTED] wrote: Simple answer is : it is impossible to update multiple divs with different content with one call to a controller in the way I think you are thing (I have two possible solutions I'll get to shortly) I'm

Re: AJAX Update DIVs in two layouts

2007-06-21 Thread Jeremy David Pointer
See my reply in the topic: How to update a View-DIV and an element at once with Ajax-Submit-Button? In your case solution 2 might be the better option or you could just write the js manually to update both divs i.e. something of the order: input onclick=update2divs(parameters) And js:

Re: How to update a View-DIV and an element at once with Ajax-Submit-Button?

2007-06-21 Thread Jeremy David Pointer
Chris Hartjes wrote: On 6/21/07, Jeremy David Pointer [EMAIL PROTECTED] wrote: Yes me too I've done 'AJAX' using frames and top.framename.location (sure it isn't as flexible as updating a DIV but with the right frames layout it worked wonderfully). Actually I think the problem is more

Re: How to update a View-DIV and an element at once with Ajax-Submit-Button?

2007-06-21 Thread Jeremy David Pointer
Chris Hartjes wrote: On 6/21/07, Jeremy David Pointer [EMAIL PROTECTED] wrote: It's still not the tools fault if one decides to try to use a tool for a job it wasn't made for. Okay, we're getting into philosophical debates here. My only point is that if the helper won't do what

One to many forms with ajax

2007-06-19 Thread Jeremy David Pointer
It's always boggled me why there are lots of many to many relationship examples but hardly any one to many examples. My major stumbling block here is how to set up the form and controller to save the detail lines when 'Save' is clicked and how to manage the detail table when Add/Del are

Re: One to many forms with ajax

2007-06-19 Thread Jeremy David Pointer
In case it makes a difference I'm using CakePHP 1.2 Jeremy David Pointer wrote: It's always boggled me why there are lots of many to many relationship examples but hardly any one to many examples. My major stumbling block here is how to set up the form and controller to save the detail

Re: FCKEditor Problem

2007-05-22 Thread Jeremy David Pointer
Try something like the below : The key here is the 'before' section in the ajax submit, FCKEditor attaches itself to the forms submit action but that isn't used with an ajax submit, so you have to call the code to update the form field manually. I found this methodology somewhere in the

Re: How to implement code to download files

2007-05-07 Thread Jeremy David Pointer
On Monday 07 May 2007 07:50, Anil wrote: Hi, I need the help to implement code for downloading files. If you know how to do that, please do me the favour. umm just provide a href. to th file locations. --~--~-~--~~~---~--~~ You received this message

Re: caching actions + different user

2007-05-07 Thread Jeremy David Pointer
On Saturday 05 May 2007 08:18, bingo wrote: hi bakers, I am trying to speed up things on my website by using caching. I have an action that displays all the articles that a user has in his library based on user id. I am not sure how to cache this action so that cache are stored for each

Re: $number-precission not working in controller

2007-04-20 Thread Jeremy David Pointer
Look at phps sprintf function? Joshua McFarren wrote: Ok, ok, I looked again at the manual and helpers are mean to provide functions that are commonly needed in views etc. So I guess this was stupid not easy. Also I misspelled precision in the subject AND my corner cases are not fully checked