Re: cookies ajax

2007-08-08 Thread Michael Augustyniak

John David Anderson (_psychic_) wrote:
> On Aug 8, 2007, at 9:51 AM, Michael Augustyniak wrote:
>
>   
>> to login I use ajax form and I am trying to setcookie on action
>> and it just does not set the cookie in this action .
>> When I redirect the page to different controller , action and set
>> cookies there its working.
>>
>> Why cookie does not work on action with ajax form ?
>>
>> did that
>> setcookie("remember_me", '3', time()+3600);
>> and that
>> $_COOKIES['remember_me'] = '3';
>> 
>
> Is there any reason you're not just creating the cookies with  
> JavaScript?
>   

not but it extra code which I do not need, but probably it's the only 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?hl=en
-~--~~~~--~~--~--~---



cookies ajax

2007-08-08 Thread Michael Augustyniak

to login I use ajax form and I am trying to setcookie on action
and it just does not set the cookie in this action .
When I redirect the page to different controller , action and set 
cookies there its working.

Why cookie does not work on action with ajax form ?

did that
setcookie("remember_me", '3', time()+3600);
and that
$_COOKIES['remember_me'] = '3';

thanks for 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?hl=en
-~--~~~~--~~--~--~---



Re: ajax submit form problem

2007-07-26 Thread Michael Augustyniak

Geoff Ford wrote:
> Try using $ajax->submit() instead of $form->submit();

you mean instead of $html->submit(), if yes , yeah I was trying that 
too, same thing... no data

--~--~-~--~~~---~--~~
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 submit form problem

2007-07-25 Thread Michael Augustyniak

Grant Cox wrote:
> Be more clear with your question - what is the problem, and what do
> you want to achieve?
>
> The only think I could see that is wrong, is if you submit an empty
> field, it should still come through to $this->data['User']['nickname'].
>
>
> --~--~-~--~~-
yes, but the point is that if I will submit an empty field there is no

$this->data['User']['nickname'] , it's just $this->data = null



--~--~-~--~~~---~--~~
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 submit form problem

2007-07-25 Thread Michael Augustyniak

problem to pass the data form form


form(array('action' => '/user/register'), 
'post',array('update' => 'registerFormDiv'));?>
input('User/nickname', array( 'type' => 
'text')).''.$error->messageFor('User/nickname'); ?>
submit('Register')?>


The problem is that if I leave the field blank the $this-data is null, I 
have to type something to have $this->data['User]['nickname'] not null
I checked  also with $this->params['data'] same thing.

my function

var $helpers = array('Javascript','Ajax');
var $components = array ('RequestHandler');

function register()
{   
$this->layout = 'ajax';
//if (!empty($this->data['User']))
if (!empty($this->params['data']['User']))
{
 
--- if there is no data in field it does not get in to 
this point --

}
 
}

thanks for 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?hl=en
-~--~~~~--~~--~--~---



Re: Different layout for admin route?

2007-07-12 Thread Michael Augustyniak

Mech7 wrote:
> I am using the /admin for tasks like editing / adding / deleting only
> I am wondering is it possible to automatically load a different layout
> for the the admin instead of the default.ctp?
>
>
> >
>
>   
this is whta U look for
$this->layout = '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?hl=en
-~--~~~~--~~--~--~---



Re: Undefined index: Images

2007-07-12 Thread Michael Augustyniak

Chris Hartjes wrote:
> On 7/12/07, Michael Augustyniak <[EMAIL PROTECTED]> wrote:
>   
>> class Band extends AppModel
>> {
>> var $name = 'Band';
>> var $hasMany = array('Images' =>
>>array('className' => 'Images','dependent' => true)
>>);
>> }
>>
>> 
>
> Shouldn't that be 'className' => 'Image'?
>
> I would've thought the error message pointed that out.
>
>   
well , I changed on Images because I use one component named Image, 
Component Image call $this->Image the same like the model
But any way I changed in Images model all verbs so Do not understand 
that ...at all

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



Undefined index: Images

2007-07-12 Thread Michael Augustyniak

*I am trying to delete Band and all Band's Images

$this->Band->del("$id",$cascade = true);

but getting ana error
**Notice*: Undefined index: Images in 
*/home/misiek/workspace/url/cake/libs/model/model_php5.php* on line *1009*

*Warning*: Cannot modify header information - headers already sent by 
(output started at 
/home/misiek/workspace/url/cake/libs/model/model_php5.php:1009) in 
*/home/misiek/workspace/url/cake/libs/controller/controller.php* on line 
*447***
*

class Band extends AppModel
{
var $name = 'Band';
var $hasMany = array('Images' =>
   array('className' => 'Images','dependent' => true)
   );
}

what I am doing wrong ...?
*

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



flashplayer for cake

2007-07-11 Thread Michael Augustyniak

Dear group

I am looking for goog flash mp3 player based on mysql
I was trying wimpy but seems to not have goog mysql support , hard to 
figure out what they did, no samples , they sacks if going about mysql 
support.
Another player which I checked was flamplayer, but not working for me 
totaly, not loading a playlist or on different machine just no playlist 
at all.
Just can not get this working.

I am confused now.
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
-~--~~~~--~~--~--~---



Re: submit form, update div on error

2007-07-11 Thread Michael Augustyniak

francky06l wrote:
> You can combine the redirect in same view as for the failing, or make
> 2 views. Your controller can use $this->render('success') or $this-
>   
>> render('failure') OR
>> 
> $this->set('failure', 1) and use a condition in the view.
>
> I try to be more precise with a sample (I am not good at this) :
>
> In you login view :
>
> ...
> ...
> submit(... .. ... array('update' => 'mydiv')); ?>
> 
>
> In your view or 2 views you will update the same div, difference
> being :
>
> 1) on failure, you will probably "fill up" your div with message, html
> etc...
>
> div("mydiv"); ?>
> Error
> .
> divEnd('mydiv'); ?>
>
>
> 2) on success, you will write smething like :
> div("mydiv");
> $js = "window.location.href='".FULL_BASE_URL.$this->html-
>   
>> url('/Controller/action')."'";
>> 
> echo $javascript->codeBlock($js);
> $ajax->divEnd("Mydiv");
>  ?>
>
>   
awesome
thank 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?hl=en
-~--~~~~--~~--~--~---



Re: submit form, update div on error

2007-07-10 Thread Michael Augustyniak

francky06l wrote:
> Seems if you want to update a div on error, you should make $ajax-
>   
>> submit first.
>> 
> Then your "div to update" could contain some values in case of error
> or an url in case of success. Now if you want this redirection to be
> html (not ajax), just use a javascript (window.location) ..
>   
yes I undarstand

but not sure where to use window.location should be on complete action ? 
I do not think so because I want redirect on success only.

Thank You for 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?hl=en
-~--~~~~--~~--~--~---



submit form, update div on error

2007-07-09 Thread Michael Augustyniak

formtag();?>
input('User/email', array( 'type' => 'text'));?>
password('User/password');?>
submit('Login',array('url' => '/user/login/'))?>


I need  submit form on success go somewhere else but on error update a 
div, before update render some info inside this div.
Well, Rails is so comfortable the I can do dynamic ajax inside 
controller , depends on what I need I can do ajax which I need 
(effects... etc.).

Is it possible to do with cakephp ?

Thank you for 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?hl=en
-~--~~~~--~~--~--~---



Re: drag how to use a handle options

2007-06-10 Thread Michael Augustyniak

[EMAIL PROTECTED] wrote:
> Hey.
> Try this:
>
>
> 
> handle
> 
> Body
> 
> 
>
> drag('dragme',array('handle'=>'handle'); ?>
>
> Here is a drag 'n drop tutorial (although handles aren't used in the
> tutorial)
> http://dieter.plaetinck.be/drag_n_drop_tutorial_with_cakephp_ajax_prototype_scriptaculous
>
> On Jun 8, 9:44 pm, Michael Augustyniak <[EMAIL PROTECTED]>
> wrote:
>   

Nice, thank 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?hl=en
-~--~~~~--~~--~--~---



drag how to use a handle options

2007-06-08 Thread Michael Augustyniak

my code
basiscly problem is that I can drag all div whenever I click and drag
I need to drag a div but by pressing on some point , link inside the div.
So probably I need to use handle option but do not know how to use it.





Body



drag('dragme'); ?>

can you help me pleases :)

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

2007-05-15 Thread Michael Augustyniak

I need just drag ( move ) the div around on page

but this not working for me

drag('test', array('change' => false)) ?>

div('test')?>

divEnd('test'); ?>

can someone push me in right direction please ?
thank 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?hl=en
-~--~~~~--~~--~--~---



class object in sessions

2007-05-11 Thread Michael Augustyniak

When I will store the class object in session works only in the same 
method like:
can not read the object from other methods in the same controller.

function index()
{
$this -> Session -> write('construct',new 
TextConstruct($this->params['data']['Email']['body']) );
$this->set('WordsAsStyle', 
$this->Session->read('construct')->grabWordsAs('Style'));
}


when I will go to other method blows up

function style()
{
$this->set('WordsAsStyle',$this->Session->read('construct')->grabWordsAs('Style'));
}


Fatal error
EmailController::style() [function.EmailController-style]:
 

The script tried to execute a method or access a property of an 
incomplete object.
Please ensure that the class definition 
"TextConstruct" of the object
you are trying to operate on was loaded _before_ unserialize() gets 
called or provide a __autoload() function to
load the class definition in

in code.php
I was trying with all types
define('CAKE_SESSION_SAVE', '');
cake, php, database, and '', for all this option got the same error

Thanks for 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?hl=en
-~--~~~~--~~--~--~---



session read problem

2007-05-10 Thread Michael Augustyniak

in core.php
define('CAKE_SESSION_SAVE', 'php');

trying to write the class object into session
$this -> Session -> write('construct',new 
TextConstruct($this->params['data']['Email']['body']) );

and it works because I can ready it from the same function
$this->set('WordsAsStyle', $this -> Session -> 
read('construct')->grabWordsAs('Style'));

but can not read from other function previously declared in other function

There is more cake settings or doing wrong ?

I was trying set define('CAKE_SESSION_SAVE', 'cake'); either

Thanks for 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?hl=en
-~--~~~~--~~--~--~---



Re: cakephp rendering

2007-05-09 Thread Michael Augustyniak

Sliv wrote:
> http://manual.cakephp.org/chapter/request_handler
>   
yeah thanks, but there is no sample in my case w

my code


controller Email
var $components = array('RequestHandler');

function index()
{
$this->RequestHandler->setAjax($this);
}


function edit()
{
$this->render('edit');
}


index.thtml
if render('edit'); ?> /* double layout*/
if render('edit','ajax'); ?> /* no layout at all, ajax 
action inside edit.thtml not working*/

what I am missing ? please give me a sing

--~--~-~--~~~---~--~~
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: cakephp rendering

2007-05-09 Thread Michael Augustyniak

gwoo wrote:
> use the RequestHandler component with ajax and the layout will be set
> automatically
>
>
>   

Not sure how to use it .
I added inside controller
var $components = array('RequestHandler');

so from view
I use
$this->render('edit');
which give still me double layout


from controller
the same
$this->render('edit');


so I need to do something in view ?
I found $this->RequestHandler->setAjax($this); but where I suppose to add ?

Totally confused

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