Re: About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread skyblueink
; > Wayne > > On 10/22/07, AD7six <[EMAIL PROTECTED]> wrote: > > > > > > > On Oct 22, 9:44 pm, skyblueink <[EMAIL PROTECTED]> wrote: > > > > > Did you try any of your questions? You could have checked all of those > > possibilities in less t

About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread skyblueink
As you know, the distinction between singular and plural forms of nouns is important in Cake naming convention. That is, model names (class names and file names) are supposed to be singular, while table names, controller names and view names are to be plural. For example, we have LineItem and lin

STOP button in browsers and onLoad event

2007-04-09 Thread skyblueink
Sorry, this is not CakePHP stuff, but javascipt stuff. When we fire a javascript function through "onLoad" event, it works through two steps like the following: (1) First, the page is loaded. (2) Javascript function is fired. This is the definition of onLoad event, and we all know that the STOP

How to stop Ajax triggered by onLoad event?

2007-04-07 Thread skyblueink
The code below, using prototype and Ajax, populates 3 s. But, once the page is loaded and Event.observing is acting, can I stop the populating with a click button? I thought Event.stop() and Event.stopObserving() should come, and did some tries but failed. Event.observe(window, 'load',function(e

Can we stop page loading while populating s with onload events?

2007-04-04 Thread skyblueink
Using AJAX and onLoad event, we do populating many s and it generally takes relatively long time to complete the page loading, which makes the STOP button indispensable. The following code generates 9 s and 9 onLoad events to populate them. It works great, but once the onLoad events are fired, th

Re: New install - missing controller error

2007-04-03 Thread skyblueink
When you point your browser to http://localhost/users/ , cakePHP searches for an index action in users_controller.php, and an index.thtml. So you must add them. /app/controllers/users_controller.php /app/views/users/index.thtml On 4월4일, 오전7시00분, "Dave" <[EMAIL PROTECTED]> wrote: > I tried

Re: A prototype question

2007-03-29 Thread skyblueink
</title> > <script type="text/javascript" src="app/webroot/js/prototype.js"> > > function execute() { > var item = $('sample'); > Element.update(item, "Hello!"); > } > > > > > element > element2 >

A prototype question

2007-03-29 Thread skyblueink
I know this is not a CakePHP problem, but related to it. The simple example below does not work in IE and FireFox. I don't why, but the PHPEd debugger gives a messge "OBJECT is required". I have some experiences in using prototype in CakePHP, but I'm trying to go more deep into prototype by learni

How to measure Loading time in AJAX for each

2007-03-27 Thread skyblueink
Next snippet is supposed to show 10 s, each displays the loading time. Loading time is the difference between endTime and startTime: startTime and endTime was given by javascript Date.getTime method at the time of 'loading' and 'complete' for each run of $i. But the calculated time is always 0, th

Re: Not "relative" but "absolute" link is needed.

2007-03-25 Thread skyblueink
bit and put the direct link in. > > On Mar 25, 11:06 am, "skyblueink" <[EMAIL PROTECTED]> wrote: > > > > > The following index.thtml gives a Google link > > ofhttp://www.mydomain.com/tests/http://www.google.cominsteadofhttp://www.google.

Not "relative" but "absolute" link is needed.

2007-03-25 Thread skyblueink
The following index.thtml gives a Google link of http://www.mydomain.com/tests/http://www.google.com instead of http://www.google.com. What shoud I do to get get the correct link? -index.thtml- function insertScript(){ var sHTML="

The order of AJAX updates can be controlled?

2007-03-20 Thread skyblueink
I'm updating the with id = indicator to show the progress of page loading whenever every content(that is, s with id = view0, view2, vie3,...,view9) is displayed. for ($i = 0; $i < 10; $i++){ $view = 'view' . $i; echo ""; $options = array( 'update' => "$view", 'url'

Re: How to hide preceding s when $ajax->link button is clicked

2007-03-11 Thread skyblueink
Thanks, Kjell! On 3월12일, 오전12시23분, "Kjell Bublitz" <[EMAIL PROTECTED]> wrote: > Give the "view" divs a class... lets say "view" > > > Then you can go like this: > $$('.view').invoke('hide'); > > thats it :) > >

How to hide preceding s when $ajax->link button is clicked

2007-03-11 Thread skyblueink
//index.thtml link('FAQ/HELP', '/books/faq', array('update' => 'faq')); ?> "; options = array( 'update' => "$view", 'url' => "/books/lister/?id=$i, 'type' => 'asynchronous', 'loading' => "Element.hide($view);", 'complete' => "Effect.Appear($view);" ); echo $javascript->event('window

How to stop page loading in Cake?

2007-03-08 Thread skyblueink
Hi, Bakers! I succeeded in loading 10 divs in sequence, using the following snippet. But, my question here is how to stop the page loading after it started loading. I tried both link('STOP',"javascript:window.stop()" ); ?> and link('STOP',"javascript:document.execCommand('stop')" ); ?> in IE6 an

Re: How to pass variables via GET method?

2007-02-18 Thread skyblueink
Thanks, Sergei and Grant Cox. Both of your suggestions works. On 2월18일, 오후2시23분, "Sergei" <[EMAIL PROTECTED]> wrote: > "url" => "/books/lister/?id=1&display=" . $mydisplay, > > see the difference? > > On 18 фев, 04:53, &quo

How to pass variables via GET method?

2007-02-17 Thread skyblueink
I know this in not a Cake problem, but I think it's what we come across frequently in real world. 'view', 'url' => '/books/lister/?id=1&display=$mydisplay', 'type' => 'asynchronous', 'loading' => "Element.hide('view');", 'complete' => "Element.show('in

How to feed data from view to controller using ajax helper?

2007-02-11 Thread skyblueink
//index.thtml 'orange' ,'color'='yellow', 'food'='spaghetti') $options = array( 'update' => 'view', 'url' => '/demos/hello/', 'complete' => "Effect.Appear('view')" ); echo $javascript->event('window','load',$ajax- >remoteFunction($options),false); ?>

Can javascript or ajax do this?

2007-02-11 Thread skyblueink
//index.thtml Hi, the preceding example shows index.thtml, and I want javascript update the div (id=test) three times on the client side without using any view files such as 'url' => '/demo/test' so that the div is updated to show the $test strings, i.e. "first", "second", and "third' in s

updating without using url.

2007-02-09 Thread skyblueink
'loading', 'complete' => "Element.show('loading')" ); echo $javascript->event('window','load',$ajax- >remoteFunction($options),false); ?> 'loading', 'complete' => "Element.show('loading')" ); echo $javascript->event('window','load',$ajax- >remoteFunct

one "progress bar" for multiple s

2007-02-08 Thread skyblueink
Hello, bakers! In the example below, I'm calling two ajax requests in sequence so that two divs(id=view_first, view_second) are updated totally independantly. Since updating requires some time, I have a "progress bar" div(id=loading) to show which div is being updated. But currently, only "Loading

Is sequential updating possible in AJAX?

2007-02-04 Thread skyblueink
index.thtml link('Click', '/sparks/update', array('update' => array('first', 'second'))); ?> div first div second update.thtml div('first'); ?> divEnd('first'); ?> div('second'); ?> divEnd('second'); ?> Hello! The preceding snippet is an example of multi update, and works greatly, but in a w

multiple update with ajax

2007-02-03 Thread skyblueink
Here is a very simple and useful code. (original code: http://cakebaker.42dh.com/2006/06/29/how-to-update- multiple-divs-with-ajax/ ) 1. sparks_controller.php layout = 'ajax'; } } ?> 2. index.thtml http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; lang=

Re: Can CakePHP do this? - Two

2007-01-04 Thread skyblueink
> wrote: 2007/1/3, skyblueink <[EMAIL PROTECTED]>: > I have no choice but to call $this->set() one thousand times in > Controller, and write foreach statement one thousand times in View.Maybe you could make myfunction() a little bit more intelligent? function myfunction(

Re: Can CakePHP do this? - Two

2007-01-03 Thread skyblueink
Thanks Chris, I'll answer you in other thread. On 1 4 , 6 00 , "Chris Hartjes" <[EMAIL PROTECTED]> wrote: On 1/3/07, skyblueink <[EMAIL PROTECTED]> wrote: > Yes, surely it will give the output I wanted. Thank you for your work, > but what if I have to c

Help me to change the structure of my application.

2007-01-03 Thread skyblueink
1. MODEL $this->Test->scraper($shop, $author) The function scraper() gets $shop(the name of a internet bookshop site) and $author as arguments and returns a title list of the first 10 books being sold there with $author as the author. $booklist = $scraper('amazon','Shakespeare'); will return.

Re: Can CakePHP do this? - Two

2007-01-03 Thread skyblueink
Yes, surely it will give the output I wanted. Thank you for your work, but what if I have to call myfunction one thousand times? $this->set('fruits', $this->Test->myfunction(1)); $this->set('animals', $this->Test->myfunction(2)); . $this->set('colors', $this->Test->myfunction(1000))

Re: Can't we use $this->set in a loop?

2007-01-03 Thread skyblueink
일, 오전1시35분, "skyblueink" <[EMAIL PROTECTED]> wrote: Hi, rpetrain1 yes there is also a synchronization problem between the controller and the view. I know that $this->set doesn't do appending, but appending is time consuming in real life. What I aim at is 'not appending':

Re: Can't we use $this->set in a loop?

2007-01-03 Thread skyblueink
Hi, rpetrain1 yes there is also a synchronization problem between the controller and the view. I know that $this->set doesn't do appending, but appending is time consuming in real life. What I aim at is 'not appending': instead of appending string data, I want to send each datum to view so that

Re: Can't we use $this->set in a loop?

2007-01-03 Thread skyblueink
r ($i = 1; $i <= 3; $i++) { echo "i is " . $i . ""; } } I'm a newbie in CakePHP, but this lack of "on the fly" output in loops seems to be resident in MVC frameworks such as Cake. On 1 4 , 12 25 , "Chris Hartjes" <[EMAIL PROTECTED]&

Can't we use $this->set in a loop?

2007-01-03 Thread skyblueink
I have a very simple program. Here is the controller. set('message',"i is " . $i . ""); } } } ?> And here is the view. I expected an output like: i is 1 i is 2 i is 3 but the actual output was: i is 3. Does this mean we can't $this->set in a loop? Or am I making a mistake? I just want

Re: Can CakePHP do this? - Two

2007-01-03 Thread skyblueink
but I'm not sure how your doing your sequential outputs, or how you are calling pass. Yeah, that's the problem, and I think it maybe the limitation of CakePHP or in general MVC frameworks. In actual, we can't get the desired output since we can't do the sequential outputs, call pass(). On 1

Re: Can CakePHP do this? - Two

2007-01-02 Thread skyblueink
hermore, to delimitate the sequential outputs, placing headers would be better. Header 1: fruits are here. lemon banana apple Header 2: animals are here. lion tiger monkey Header 3: colors are here. red blue green On 1 3 , 2 09 , "TJSingleton" <[EMAIL PROTECTED]> wrote: skyblu

Re: Can CakePHP do this? - Two

2007-01-02 Thread skyblueink
if ($i == 3) echo "Now, colors are being collected."; $result = $this->Test->myfunction($i); for ($j = 0; $j <= 2; $j++) { echo $result($j); } } On 1 3 , 1 13 , "skyblueink" <[EMAIL PROTECTED]> wrote: OK, thanks to the

Can CakePHP do this? - Two

2007-01-02 Thread skyblueink
OK, thanks to the help of kind people here I've got a working simple example program(see below). =The Example Code= -test.php includes next lines Test->myfunction($i)); } $this->set('result',$result); } } ?> -And, pass.thtml includes next lines. "; } ?> Currently, he output is: lemon

Re: Can CakePHP do this?

2007-01-01 Thread skyblueink
Thanks, nate & gwoo!! It works! By the way, please replace my Model with the next correction to run the example code. I made a mistake. On 1 2 , 7 59 , "gwoo" <[EMAIL PROTECTED]> wrote: am() is a basic Cake function. Download the CakeSheethttp://cakephp.org/cakesheet.pdf or Get a life si

Re: Can CakePHP do this?

2007-01-01 Thread skyblueink
Thanks, nate! But what is 'am' in $result = am($result, $this->Test->myfunction($i)); ? Is it a PHP function or a CakePHP function (I can't figure out right now)? On 1 2 , 6 23 , "nate" <[EMAIL PROTECTED]> wrote: The problem is in pass(). If you keep set()ting a variable of the same name,

Re: New to Cake, Missing View Errors (?)

2007-01-01 Thread skyblueink
If you're following along with the blog tutorial withoit any modifications of the example code, your intex.thtml and view.thtml should be in app/views/posts/ instead of app/views/pages/. The error message is already saying that ithey shoud be in /.../httpdocs/app/views/posts/. As you know, Cake i

Can CakePHP do this?

2007-01-01 Thread skyblueink
-test.php includes next lines. -tests_controller.php includes next lines. Test->myfunction($i); $this->set('result',$result); } } } ?> -And, pass.thtml includes next lines. "; } ?> The run cakephp/tests/php gives only "colors": red blue green But, what I want is to get all of