[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-16 Thread kowal grzes
If link is created then use FireBug to check where is problem.
You can check if request is sent and what came in response.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-16 Thread kowal grzes


 I added this helper in my partial. Still not working :(

 But what is happening?
Link is generated? Maybe put some code from page source here so we can see
what was generated by this tag.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-09 Thread Murali Krishna B
Hi all,

I am also facing the same problem in deleting posts with AJAX. The partial
is creating some random id's for delete links. But events are not added for
those links.
When it is done from template, I can see all delete links and their events.
But When I deleted a post from them, partial is creating links, which are
not working.

Any solutions for this?

Thanks,

Murali Krishna

2009/11/4 dziobacz aaabbbcccda...@gmail.com


 I have a solution - it isn't easy :) You have my idea here:

 a href=http://forum.symfony-project.org/index.php/t/23505/;http://
 forum.symfony-project.org/index.php/t/23505//a

 Is it a good solution ? It works but maybe it should be make in other
 way ?



 On 23 Paź, 19:47, Gareth McCumskey gmccums...@gmail.com wrote:
  a link_to_remote pointing at an action and that action processing on to a
  regular does not cause any problem whatsoever!
 
  Read the documentation again. Symfony automatically does not include the
  layout around a template file if it is being loaded in response to an
 Ajax
  request.
 
  2009/10/23 Raphael raphox.ara...@gmail.com
 
 
 
   yes Gareth, but.
   if only load a complete action, you load templates, debug_bar and
 others.
   if you dont know methos for drop this of request.
   because this I recomender render text or partial.
 
   On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey 
 gmccums...@gmail.comwrote:
 
   No you don't. You can load an action template inside a div using
   link_to_remote
 
   And FYI I use the link_to_remote all the time. An error 500 is an
   application error server side which you need to fix. Go through your
 code
   and debug as normal
 
   On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com
 wrote:
 
   its possible...
 
   because the ajax helpers dont has in core symfony after 1.2
 
   but you error is in dont uses:
 
   return $this-renderText('('.$output.')');
 
   or
 
   return $this-renderPartial('partial', array('var1' = $var1));
 
   you are trying render an action, its not possible, you need text or
   partial in your ajax call.
 
   example:
  
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_1...
 
   On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.com
 wrote:
 
   really nobody used link_to_remote() ??
 
   On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
ok thx, but now after deleted post I see inside div 'ajaxclass'
 (where
should be posts) small website with 500 error :(
 
On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:
 
 The link_to_remote function needs a div ID passed not a div
 CLASS.
   So div
 class=ajaxclass should be div id=ajaxclass
 
 On Thu, Oct 22, 2009 at 1:12 PM, dziobacz 
 aaabbbcccda...@gmail.com
   wrote:
 
  I want to delete posts from my forum without refresh page but
 now
  after clicked link 'Delete post' post is deleting without
   refreshing
  page but it is still showing - I must refresh page and then it
   isn't
  showing - why ?
 
  I have actions:
 
  class forumActions extends sfActions
  {
 
   public function executeIndex(sfWebRequest $request)
   {
 $this-posts = Doctrine::getTable('Posts')-getPosts();
   }
 
   public function executeDelete(sfWebRequest $request)
   {
 if ($request-isXmlHttpRequest())
 {
 $post =
  Doctrine::getTable('Posts')-find($request-getParameter
  ('post'));
 $post-delete();
 
 $this-posts =
   Doctrine::getTable('Posts')-getPosts();
 }
   }
 
  And my template indexSuccess.php:
 
  ?php use_helper('Javascript') ?
 
  div class=ajaxclass
  ?php foreach ($posts as $x): ?
 
 ?php echo $x-getPost();   ?
br/
 
 ?php echo link_to_remote('Delete post', array(
 'update' = 'ajaxclass',
 'url'= '/forum/delete/post/'.$x-getId(),
 )) ?
 
 br/br/
 
  ?php endforeach; ?
  /div
 
 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc
 
   --
   Raphael Almeida Araújo
   Homepage:http://sites.google.com/site/raphoxaraujo
 
   --
   Gareth McCumskey
 
  http://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
   --
   Raphael Almeida Araújo
   Homepage:http://sites.google.com/site/raphoxaraujo
 
  --
  Gareth McCumskeyhttp://garethmccumskey.blogspot.com
  twitter: @garethmcc
 



-- 
Thanks  Regards,

Murali Krishna.B,

Yahoo! SDC

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-09 Thread dziobacz

You must add in partial file '_yourpartialfile.php':

?php use_helper('Javascript') ?


On 9 Lis, 10:31, Murali Krishna B muralikrishna.vi...@gmail.com
wrote:
 Hi all,

 I am also facing the same problem in deleting posts with AJAX. The partial
 is creating some random id's for delete links. But events are not added for
 those links.
 When it is done from template, I can see all delete links and their events.
 But When I deleted a post from them, partial is creating links, which are
 not working.

 Any solutions for this?

 Thanks,

 Murali Krishna

 2009/11/4 dziobacz aaabbbcccda...@gmail.com





  I have a solution - it isn't easy :) You have my idea here:

  a href=http://forum.symfony-project.org/index.php/t/23505/;http://
  forum.symfony-project.org/index.php/t/23505//a

  Is it a good solution ? It works but maybe it should be make in other
  way ?

  On 23 Paź, 19:47, Gareth McCumskey gmccums...@gmail.com wrote:
   a link_to_remote pointing at an action and that action processing on to a
   regular does not cause any problem whatsoever!

   Read the documentation again. Symfony automatically does not include the
   layout around a template file if it is being loaded in response to an
  Ajax
   request.

   2009/10/23 Raphael raphox.ara...@gmail.com

yes Gareth, but.
if only load a complete action, you load templates, debug_bar and
  others.
if you dont know methos for drop this of request.
because this I recomender render text or partial.

On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey 
  gmccums...@gmail.comwrote:

No you don't. You can load an action template inside a div using
link_to_remote

And FYI I use the link_to_remote all the time. An error 500 is an
application error server side which you need to fix. Go through your
  code
and debug as normal

On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com
  wrote:

its possible...

because the ajax helpers dont has in core symfony after 1.2

but you error is in dont uses:

return $this-renderText('('.$output.')');

or

return $this-renderPartial('partial', array('var1' = $var1));

you are trying render an action, its not possible, you need text or
partial in your ajax call.

example:

 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_1...

On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.com
  wrote:

really nobody used link_to_remote() ??

On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
 ok thx, but now after deleted post I see inside div 'ajaxclass'
  (where
 should be posts) small website with 500 error :(

 On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:

  The link_to_remote function needs a div ID passed not a div
  CLASS.
So div
  class=ajaxclass should be div id=ajaxclass

  On Thu, Oct 22, 2009 at 1:12 PM, dziobacz 
  aaabbbcccda...@gmail.com
wrote:

   I want to delete posts from my forum without refresh page but
  now
   after clicked link 'Delete post' post is deleting without
refreshing
   page but it is still showing - I must refresh page and then it
isn't
   showing - why ?

   I have actions:

   class forumActions extends sfActions
   {

    public function executeIndex(sfWebRequest $request)
    {
      $this-posts = Doctrine::getTable('Posts')-getPosts();
    }

    public function executeDelete(sfWebRequest $request)
    {
          if ($request-isXmlHttpRequest())
          {
                  $post =
   Doctrine::getTable('Posts')-find($request-getParameter
   ('post'));
                  $post-delete();

                  $this-posts =
Doctrine::getTable('Posts')-getPosts();
          }
    }

   And my template indexSuccess.php:

   ?php use_helper('Javascript') ?

   div class=ajaxclass
   ?php foreach ($posts as $x): ?

          ?php echo $x-getPost();       ?
         br/

          ?php echo link_to_remote('Delete post', array(
          'update' = 'ajaxclass',
          'url'    = '/forum/delete/post/'.$x-getId(),
          )) ?

          br/br/

   ?php endforeach; ?
   /div

  --
  Gareth McCumskeyhttp://garethmccumskey.blogspot.com
  twitter: @garethmcc

--
Raphael Almeida Araújo
Homepage:http://sites.google.com/site/raphoxaraujo

--
Gareth McCumskey

   http://garethmccumskey.blogspot.com
twitter: @garethmcc

--
Raphael Almeida Araújo
Homepage:http://sites.google.com/site/raphoxaraujo

   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc

 --
 Thanks  Regards,

 Murali Krishna.B,

 Yahoo! SDC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to 

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-09 Thread Murali Krishna B
Hi,

Thanks for reply,

I added this helper in my partial. Still not working :(

--
Murali

2009/11/9 dziobacz aaabbbcccda...@gmail.com


 You must add in partial file '_yourpartialfile.php':

 ?php use_helper('Javascript') ?


 On 9 Lis, 10:31, Murali Krishna B muralikrishna.vi...@gmail.com
 wrote:
  Hi all,
 
  I am also facing the same problem in deleting posts with AJAX. The
 partial
  is creating some random id's for delete links. But events are not added
 for
  those links.
  When it is done from template, I can see all delete links and their
 events.
  But When I deleted a post from them, partial is creating links, which are
  not working.
 
  Any solutions for this?
 
  Thanks,
 
  Murali Krishna
 
  2009/11/4 dziobacz aaabbbcccda...@gmail.com
 
 
 
 
 
   I have a solution - it isn't easy :) You have my idea here:
 
   a href=http://forum.symfony-project.org/index.php/t/23505/;http://
   forum.symfony-project.org/index.php/t/23505//a
 
   Is it a good solution ? It works but maybe it should be make in other
   way ?
 
   On 23 Paź, 19:47, Gareth McCumskey gmccums...@gmail.com wrote:
a link_to_remote pointing at an action and that action processing on
 to a
regular does not cause any problem whatsoever!
 
Read the documentation again. Symfony automatically does not include
 the
layout around a template file if it is being loaded in response to an
   Ajax
request.
 
2009/10/23 Raphael raphox.ara...@gmail.com
 
 yes Gareth, but.
 if only load a complete action, you load templates, debug_bar and
   others.
 if you dont know methos for drop this of request.
 because this I recomender render text or partial.
 
 On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey 
   gmccums...@gmail.comwrote:
 
 No you don't. You can load an action template inside a div using
 link_to_remote
 
 And FYI I use the link_to_remote all the time. An error 500 is an
 application error server side which you need to fix. Go through
 your
   code
 and debug as normal
 
 On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com
 
   wrote:
 
 its possible...
 
 because the ajax helpers dont has in core symfony after 1.2
 
 but you error is in dont uses:
 
 return $this-renderText('('.$output.')');
 
 or
 
 return $this-renderPartial('partial', array('var1' = $var1));
 
 you are trying render an action, its not possible, you need text
 or
 partial in your ajax call.
 
 example:
 
  http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_1.
 ..
 
 On Thu, Oct 22, 2009 at 1:09 PM, dziobacz 
 aaabbbcccda...@gmail.com
   wrote:
 
 really nobody used link_to_remote() ??
 
 On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
  ok thx, but now after deleted post I see inside div
 'ajaxclass'
   (where
  should be posts) small website with 500 error :(
 
  On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com
 wrote:
 
   The link_to_remote function needs a div ID passed not a div
   CLASS.
 So div
   class=ajaxclass should be div id=ajaxclass
 
   On Thu, Oct 22, 2009 at 1:12 PM, dziobacz 
   aaabbbcccda...@gmail.com
 wrote:
 
I want to delete posts from my forum without refresh page
 but
   now
after clicked link 'Delete post' post is deleting without
 refreshing
page but it is still showing - I must refresh page and
 then it
 isn't
showing - why ?
 
I have actions:
 
class forumActions extends sfActions
{
 
 public function executeIndex(sfWebRequest $request)
 {
   $this-posts = Doctrine::getTable('Posts')-getPosts();
 }
 
 public function executeDelete(sfWebRequest $request)
 {
   if ($request-isXmlHttpRequest())
   {
   $post =
Doctrine::getTable('Posts')-find($request-getParameter
('post'));
   $post-delete();
 
   $this-posts =
 Doctrine::getTable('Posts')-getPosts();
   }
 }
 
And my template indexSuccess.php:
 
?php use_helper('Javascript') ?
 
div class=ajaxclass
?php foreach ($posts as $x): ?
 
   ?php echo $x-getPost();   ?
  br/
 
   ?php echo link_to_remote('Delete post', array(
   'update' = 'ajaxclass',
   'url'= '/forum/delete/post/'.$x-getId(),
   )) ?
 
   br/br/
 
?php endforeach; ?
/div
 
   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
 --
 Raphael Almeida Araújo
 Homepage:http://sites.google.com/site/raphoxaraujo
 
 --
 Gareth McCumskey
 
http://garethmccumskey.blogspot.com
 twitter: @garethmcc
 
 --
 Raphael Almeida Araújo
 Homepage:http://sites.google.com/site/raphoxaraujo
 
--

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-09 Thread dziobacz

Maybe try include in frontend\(or backend)\config\view.yml:
javascripts:[jquery]
And download jquery from: http://jquery.com/
and add it to web\js

Then: symfony cc


On 9 Lis, 11:15, Murali Krishna B muralikrishna.vi...@gmail.com
wrote:
 Hi,

 Thanks for reply,

 I added this helper in my partial. Still not working :(

 --
 Murali

 2009/11/9 dziobacz aaabbbcccda...@gmail.com





  You must add in partial file '_yourpartialfile.php':

  ?php use_helper('Javascript') ?

  On 9 Lis, 10:31, Murali Krishna B muralikrishna.vi...@gmail.com
  wrote:
   Hi all,

   I am also facing the same problem in deleting posts with AJAX. The
  partial
   is creating some random id's for delete links. But events are not added
  for
   those links.
   When it is done from template, I can see all delete links and their
  events.
   But When I deleted a post from them, partial is creating links, which are
   not working.

   Any solutions for this?

   Thanks,

   Murali Krishna

   2009/11/4 dziobacz aaabbbcccda...@gmail.com

I have a solution - it isn't easy :) You have my idea here:

a href=http://forum.symfony-project.org/index.php/t/23505/;http://
forum.symfony-project.org/index.php/t/23505//a

Is it a good solution ? It works but maybe it should be make in other
way ?

On 23 Paź, 19:47, Gareth McCumskey gmccums...@gmail.com wrote:
 a link_to_remote pointing at an action and that action processing on
  to a
 regular does not cause any problem whatsoever!

 Read the documentation again. Symfony automatically does not include
  the
 layout around a template file if it is being loaded in response to an
Ajax
 request.

 2009/10/23 Raphael raphox.ara...@gmail.com

  yes Gareth, but.
  if only load a complete action, you load templates, debug_bar and
others.
  if you dont know methos for drop this of request.
  because this I recomender render text or partial.

  On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey 
gmccums...@gmail.comwrote:

  No you don't. You can load an action template inside a div using
  link_to_remote

  And FYI I use the link_to_remote all the time. An error 500 is an
  application error server side which you need to fix. Go through
  your
code
  and debug as normal

  On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com

wrote:

  its possible...

  because the ajax helpers dont has in core symfony after 1.2

  but you error is in dont uses:

  return $this-renderText('('.$output.')');

  or

  return $this-renderPartial('partial', array('var1' = $var1));

  you are trying render an action, its not possible, you need text
  or
  partial in your ajax call.

  example:

   http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_1.
  ..

  On Thu, Oct 22, 2009 at 1:09 PM, dziobacz 
  aaabbbcccda...@gmail.com
wrote:

  really nobody used link_to_remote() ??

  On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
   ok thx, but now after deleted post I see inside div
  'ajaxclass'
(where
   should be posts) small website with 500 error :(

   On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com
  wrote:

The link_to_remote function needs a div ID passed not a div
CLASS.
  So div
class=ajaxclass should be div id=ajaxclass

On Thu, Oct 22, 2009 at 1:12 PM, dziobacz 
aaabbbcccda...@gmail.com
  wrote:

 I want to delete posts from my forum without refresh page
  but
now
 after clicked link 'Delete post' post is deleting without
  refreshing
 page but it is still showing - I must refresh page and
  then it
  isn't
 showing - why ?

 I have actions:

 class forumActions extends sfActions
 {

  public function executeIndex(sfWebRequest $request)
  {
    $this-posts = Doctrine::getTable('Posts')-getPosts();
  }

  public function executeDelete(sfWebRequest $request)
  {
        if ($request-isXmlHttpRequest())
        {
                $post =
 Doctrine::getTable('Posts')-find($request-getParameter
 ('post'));
                $post-delete();

                $this-posts =
  Doctrine::getTable('Posts')-getPosts();
        }
  }

 And my template indexSuccess.php:

 ?php use_helper('Javascript') ?

 div class=ajaxclass
 ?php foreach ($posts as $x): ?

        ?php echo $x-getPost();       ?
       br/

        ?php echo link_to_remote('Delete post', array(
        'update' = 'ajaxclass',
        'url'    = '/forum/delete/post/'.$x-getId(),
        )) ?

        br/br/

 ?php endforeach; ?
 /div

--
Gareth McCumskeyhttp://garethmccumskey.blogspot.com

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-11-03 Thread dziobacz

I have a solution - it isn't easy :) You have my idea here:

a href=http://forum.symfony-project.org/index.php/t/23505/;http://
forum.symfony-project.org/index.php/t/23505//a

Is it a good solution ? It works but maybe it should be make in other
way ?



On 23 Paź, 19:47, Gareth McCumskey gmccums...@gmail.com wrote:
 a link_to_remote pointing at an action and that action processing on to a
 regular does not cause any problem whatsoever!

 Read the documentation again. Symfony automatically does not include the
 layout around a template file if it is being loaded in response to an Ajax
 request.

 2009/10/23 Raphael raphox.ara...@gmail.com



  yes Gareth, but.
  if only load a complete action, you load templates, debug_bar and others.
  if you dont know methos for drop this of request.
  because this I recomender render text or partial.

  On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey 
  gmccums...@gmail.comwrote:

  No you don't. You can load an action template inside a div using
  link_to_remote

  And FYI I use the link_to_remote all the time. An error 500 is an
  application error server side which you need to fix. Go through your code
  and debug as normal

  On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com wrote:

  its possible...

  because the ajax helpers dont has in core symfony after 1.2

  but you error is in dont uses:

  return $this-renderText('('.$output.')');

  or

  return $this-renderPartial('partial', array('var1' = $var1));

  you are trying render an action, its not possible, you need text or
  partial in your ajax call.

  example:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_1...

  On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.comwrote:

  really nobody used link_to_remote() ??

  On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
   ok thx, but now after deleted post I see inside div 'ajaxclass' (where
   should be posts) small website with 500 error :(

   On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:

The link_to_remote function needs a div ID passed not a div CLASS.
  So div
class=ajaxclass should be div id=ajaxclass

On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com
  wrote:

 I want to delete posts from my forum without refresh page but now
 after clicked link 'Delete post' post is deleting without
  refreshing
 page but it is still showing - I must refresh page and then it
  isn't
 showing - why ?

 I have actions:

 class forumActions extends sfActions
 {

  public function executeIndex(sfWebRequest $request)
  {
    $this-posts = Doctrine::getTable('Posts')-getPosts();
  }

  public function executeDelete(sfWebRequest $request)
  {
        if ($request-isXmlHttpRequest())
        {
                $post =
 Doctrine::getTable('Posts')-find($request-getParameter
 ('post'));
                $post-delete();

                $this-posts =
  Doctrine::getTable('Posts')-getPosts();
        }
  }

 And my template indexSuccess.php:

 ?php use_helper('Javascript') ?

 div class=ajaxclass
 ?php foreach ($posts as $x): ?

        ?php echo $x-getPost();       ?
       br/

        ?php echo link_to_remote('Delete post', array(
        'update' = 'ajaxclass',
        'url'    = '/forum/delete/post/'.$x-getId(),
        )) ?

        br/br/

 ?php endforeach; ?
 /div

--
Gareth McCumskeyhttp://garethmccumskey.blogspot.com
twitter: @garethmcc

  --
  Raphael Almeida Araújo
  Homepage:http://sites.google.com/site/raphoxaraujo

  --
  Gareth McCumskey

 http://garethmccumskey.blogspot.com
  twitter: @garethmcc

  --
  Raphael Almeida Araújo
  Homepage:http://sites.google.com/site/raphoxaraujo

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-23 Thread Gareth McCumskey
No you don't. You can load an action template inside a div using
link_to_remote

And FYI I use the link_to_remote all the time. An error 500 is an
application error server side which you need to fix. Go through your code
and debug as normal

On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com wrote:

 its possible...

 because the ajax helpers dont has in core symfony after 1.2

 but you error is in dont uses:

 return $this-renderText('('.$output.')');

 or

 return $this-renderPartial('partial', array('var1' = $var1));

 you are trying render an action, its not possible, you need text or partial
 in your ajax call.

 example:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_json



 On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.comwrote:


 really nobody used link_to_remote() ??

 On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
  ok thx, but now after deleted post I see inside div 'ajaxclass' (where
  should be posts) small website with 500 error :(
 
  On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:
 
   The link_to_remote function needs a div ID passed not a div CLASS. So
 div
   class=ajaxclass should be div id=ajaxclass
 
   On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com
 wrote:
 
I want to delete posts from my forum without refresh page but now
after clicked link 'Delete post' post is deleting without refreshing
page but it is still showing - I must refresh page and then it isn't
showing - why ?
 
I have actions:
 
class forumActions extends sfActions
{
 
 public function executeIndex(sfWebRequest $request)
 {
   $this-posts = Doctrine::getTable('Posts')-getPosts();
 }
 
 public function executeDelete(sfWebRequest $request)
 {
   if ($request-isXmlHttpRequest())
   {
   $post =
Doctrine::getTable('Posts')-find($request-getParameter
('post'));
   $post-delete();
 
   $this-posts =
 Doctrine::getTable('Posts')-getPosts();
   }
 }
 
And my template indexSuccess.php:
 
?php use_helper('Javascript') ?
 
div class=ajaxclass
?php foreach ($posts as $x): ?
 
   ?php echo $x-getPost();   ?
  br/
 
   ?php echo link_to_remote('Delete post', array(
   'update' = 'ajaxclass',
   'url'= '/forum/delete/post/'.$x-getId(),
   )) ?
 
   br/br/
 
?php endforeach; ?
/div
 
   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
 




 --
 Raphael Almeida Araújo
 Homepage: http://sites.google.com/site/raphoxaraujo


 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-23 Thread Raphael
yes Gareth, but.
if only load a complete action, you load templates, debug_bar and others. if
you dont know methos for drop this of request.
because this I recomender render text or partial.

On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey gmccums...@gmail.comwrote:

 No you don't. You can load an action template inside a div using
 link_to_remote

 And FYI I use the link_to_remote all the time. An error 500 is an
 application error server side which you need to fix. Go through your code
 and debug as normal

 On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com wrote:

 its possible...

 because the ajax helpers dont has in core symfony after 1.2

 but you error is in dont uses:

 return $this-renderText('('.$output.')');

 or

 return $this-renderPartial('partial', array('var1' = $var1));

 you are trying render an action, its not possible, you need text or
 partial in your ajax call.

 example:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_json



 On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.comwrote:


 really nobody used link_to_remote() ??

 On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
  ok thx, but now after deleted post I see inside div 'ajaxclass' (where
  should be posts) small website with 500 error :(
 
  On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:
 
   The link_to_remote function needs a div ID passed not a div CLASS. So
 div
   class=ajaxclass should be div id=ajaxclass
 
   On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com
 wrote:
 
I want to delete posts from my forum without refresh page but now
after clicked link 'Delete post' post is deleting without
 refreshing
page but it is still showing - I must refresh page and then it
 isn't
showing - why ?
 
I have actions:
 
class forumActions extends sfActions
{
 
 public function executeIndex(sfWebRequest $request)
 {
   $this-posts = Doctrine::getTable('Posts')-getPosts();
 }
 
 public function executeDelete(sfWebRequest $request)
 {
   if ($request-isXmlHttpRequest())
   {
   $post =
Doctrine::getTable('Posts')-find($request-getParameter
('post'));
   $post-delete();
 
   $this-posts =
 Doctrine::getTable('Posts')-getPosts();
   }
 }
 
And my template indexSuccess.php:
 
?php use_helper('Javascript') ?
 
div class=ajaxclass
?php foreach ($posts as $x): ?
 
   ?php echo $x-getPost();   ?
  br/
 
   ?php echo link_to_remote('Delete post', array(
   'update' = 'ajaxclass',
   'url'= '/forum/delete/post/'.$x-getId(),
   )) ?
 
   br/br/
 
?php endforeach; ?
/div
 
   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
 




 --
 Raphael Almeida Araújo
 Homepage: http://sites.google.com/site/raphoxaraujo






 --
 Gareth McCumskey

 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 



-- 
Raphael Almeida Araújo
Homepage: http://sites.google.com/site/raphoxaraujo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-23 Thread Gareth McCumskey
a link_to_remote pointing at an action and that action processing on to a
regular does not cause any problem whatsoever!

Read the documentation again. Symfony automatically does not include the
layout around a template file if it is being loaded in response to an Ajax
request.

2009/10/23 Raphael raphox.ara...@gmail.com

 yes Gareth, but.
 if only load a complete action, you load templates, debug_bar and others.
 if you dont know methos for drop this of request.
 because this I recomender render text or partial.

 On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey 
 gmccums...@gmail.comwrote:

 No you don't. You can load an action template inside a div using
 link_to_remote

 And FYI I use the link_to_remote all the time. An error 500 is an
 application error server side which you need to fix. Go through your code
 and debug as normal

 On Thu, Oct 22, 2009 at 5:25 PM, Raphael raphox.ara...@gmail.com wrote:

 its possible...

 because the ajax helpers dont has in core symfony after 1.2

 but you error is in dont uses:

 return $this-renderText('('.$output.')');

 or

 return $this-renderPartial('partial', array('var1' = $var1));

 you are trying render an action, its not possible, you need text or
 partial in your ajax call.

 example:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_json



 On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.comwrote:


 really nobody used link_to_remote() ??

 On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
  ok thx, but now after deleted post I see inside div 'ajaxclass' (where
  should be posts) small website with 500 error :(
 
  On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:
 
   The link_to_remote function needs a div ID passed not a div CLASS.
 So div
   class=ajaxclass should be div id=ajaxclass
 
   On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com
 wrote:
 
I want to delete posts from my forum without refresh page but now
after clicked link 'Delete post' post is deleting without
 refreshing
page but it is still showing - I must refresh page and then it
 isn't
showing - why ?
 
I have actions:
 
class forumActions extends sfActions
{
 
 public function executeIndex(sfWebRequest $request)
 {
   $this-posts = Doctrine::getTable('Posts')-getPosts();
 }
 
 public function executeDelete(sfWebRequest $request)
 {
   if ($request-isXmlHttpRequest())
   {
   $post =
Doctrine::getTable('Posts')-find($request-getParameter
('post'));
   $post-delete();
 
   $this-posts =
 Doctrine::getTable('Posts')-getPosts();
   }
 }
 
And my template indexSuccess.php:
 
?php use_helper('Javascript') ?
 
div class=ajaxclass
?php foreach ($posts as $x): ?
 
   ?php echo $x-getPost();   ?
  br/
 
   ?php echo link_to_remote('Delete post', array(
   'update' = 'ajaxclass',
   'url'= '/forum/delete/post/'.$x-getId(),
   )) ?
 
   br/br/
 
?php endforeach; ?
/div
 
   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
 




 --
 Raphael Almeida Araújo
 Homepage: http://sites.google.com/site/raphoxaraujo






 --
 Gareth McCumskey

 http://garethmccumskey.blogspot.com
 twitter: @garethmcc





 --
 Raphael Almeida Araújo
 Homepage: http://sites.google.com/site/raphoxaraujo

 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-22 Thread Gareth McCumskey
The link_to_remote function needs a div ID passed not a div CLASS. So div
class=ajaxclass should be div id=ajaxclass

On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com wrote:


 I want to delete posts from my forum without refresh page but now
 after clicked link 'Delete post' post is deleting without refreshing
 page but it is still showing - I must refresh page and then it isn't
 showing - why ?

 I have actions:

 class forumActions extends sfActions
 {

  public function executeIndex(sfWebRequest $request)
  {
$this-posts = Doctrine::getTable('Posts')-getPosts();
  }

  public function executeDelete(sfWebRequest $request)
  {
if ($request-isXmlHttpRequest())
{
$post =
 Doctrine::getTable('Posts')-find($request-getParameter
 ('post'));
$post-delete();

$this-posts = Doctrine::getTable('Posts')-getPosts();
}
  }


 And my template indexSuccess.php:

 ?php use_helper('Javascript') ?

 div class=ajaxclass
 ?php foreach ($posts as $x): ?

?php echo $x-getPost();   ?
   br/

?php echo link_to_remote('Delete post', array(
'update' = 'ajaxclass',
'url'= '/forum/delete/post/'.$x-getId(),
)) ?

br/br/

 ?php endforeach; ?
 /div
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-22 Thread Gareth McCumskey
It is described as such quite plainly in the documentation:

In this example, clicking the 'Delete this post' link will issue a call to
the post/delete action in the background. The response returned by the
server will appear in the element of *id feedback*

http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_ajax_link

On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com wrote:


 I want to delete posts from my forum without refresh page but now
 after clicked link 'Delete post' post is deleting without refreshing
 page but it is still showing - I must refresh page and then it isn't
 showing - why ?

 I have actions:

 class forumActions extends sfActions
 {

  public function executeIndex(sfWebRequest $request)
  {
$this-posts = Doctrine::getTable('Posts')-getPosts();
  }

  public function executeDelete(sfWebRequest $request)
  {
if ($request-isXmlHttpRequest())
{
$post =
 Doctrine::getTable('Posts')-find($request-getParameter
 ('post'));
$post-delete();

$this-posts = Doctrine::getTable('Posts')-getPosts();
}
  }


 And my template indexSuccess.php:

 ?php use_helper('Javascript') ?

 div class=ajaxclass
 ?php foreach ($posts as $x): ?

?php echo $x-getPost();   ?
   br/

?php echo link_to_remote('Delete post', array(
'update' = 'ajaxclass',
'url'= '/forum/delete/post/'.$x-getId(),
)) ?

br/br/

 ?php endforeach; ?
 /div
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-22 Thread dziobacz

really nobody used link_to_remote() ??

On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
 ok thx, but now after deleted post I see inside div 'ajaxclass' (where
 should be posts) small website with 500 error :(

 On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:

  The link_to_remote function needs a div ID passed not a div CLASS. So div
  class=ajaxclass should be div id=ajaxclass

  On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com wrote:

   I want to delete posts from my forum without refresh page but now
   after clicked link 'Delete post' post is deleting without refreshing
   page but it is still showing - I must refresh page and then it isn't
   showing - why ?

   I have actions:

   class forumActions extends sfActions
   {

    public function executeIndex(sfWebRequest $request)
    {
      $this-posts = Doctrine::getTable('Posts')-getPosts();
    }

    public function executeDelete(sfWebRequest $request)
    {
          if ($request-isXmlHttpRequest())
          {
                  $post =
   Doctrine::getTable('Posts')-find($request-getParameter
   ('post'));
                  $post-delete();

                  $this-posts = Doctrine::getTable('Posts')-getPosts();
          }
    }

   And my template indexSuccess.php:

   ?php use_helper('Javascript') ?

   div class=ajaxclass
   ?php foreach ($posts as $x): ?

          ?php echo $x-getPost();       ?
         br/

          ?php echo link_to_remote('Delete post', array(
          'update' = 'ajaxclass',
          'url'    = '/forum/delete/post/'.$x-getId(),
          )) ?

          br/br/

   ?php endforeach; ?
   /div

  --
  Gareth McCumskeyhttp://garethmccumskey.blogspot.com
  twitter: @garethmcc


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-22 Thread Raphael
its possible...

because the ajax helpers dont has in core symfony after 1.2

but you error is in dont uses:

return $this-renderText('('.$output.')');

or

return $this-renderPartial('partial', array('var1' = $var1));

you are trying render an action, its not possible, you need text or partial
in your ajax call.

example:
http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_json


On Thu, Oct 22, 2009 at 1:09 PM, dziobacz aaabbbcccda...@gmail.com wrote:


 really nobody used link_to_remote() ??

 On 22 Paź, 14:21, dziobacz aaabbbcccda...@gmail.com wrote:
  ok thx, but now after deleted post I see inside div 'ajaxclass' (where
  should be posts) small website with 500 error :(
 
  On 22 Paź, 14:13, Gareth McCumskey gmccums...@gmail.com wrote:
 
   The link_to_remote function needs a div ID passed not a div CLASS. So
 div
   class=ajaxclass should be div id=ajaxclass
 
   On Thu, Oct 22, 2009 at 1:12 PM, dziobacz aaabbbcccda...@gmail.com
 wrote:
 
I want to delete posts from my forum without refresh page but now
after clicked link 'Delete post' post is deleting without refreshing
page but it is still showing - I must refresh page and then it isn't
showing - why ?
 
I have actions:
 
class forumActions extends sfActions
{
 
 public function executeIndex(sfWebRequest $request)
 {
   $this-posts = Doctrine::getTable('Posts')-getPosts();
 }
 
 public function executeDelete(sfWebRequest $request)
 {
   if ($request-isXmlHttpRequest())
   {
   $post =
Doctrine::getTable('Posts')-find($request-getParameter
('post'));
   $post-delete();
 
   $this-posts =
 Doctrine::getTable('Posts')-getPosts();
   }
 }
 
And my template indexSuccess.php:
 
?php use_helper('Javascript') ?
 
div class=ajaxclass
?php foreach ($posts as $x): ?
 
   ?php echo $x-getPost();   ?
  br/
 
   ?php echo link_to_remote('Delete post', array(
   'update' = 'ajaxclass',
   'url'= '/forum/delete/post/'.$x-getId(),
   )) ?
 
   br/br/
 
?php endforeach; ?
/div
 
   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc
 
 
 



-- 
Raphael Almeida Araújo
Homepage: http://sites.google.com/site/raphoxaraujo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote page flicker

2009-08-04 Thread DEEPAK BHATIA

Hi,

This wait is for making page/template available on the main page.

But I think the problem I am facing is that Yahoo Javascript library
is available on main page but its called library functions is in main
page.

Regards

Deepak

On Mon, Aug 3, 2009 at 4:21 PM, DEEPAK BHATIAtoreachdee...@gmail.com wrote:
 Hi,

 It is still not helping.

 Thanks

 Deepak

 On Mon, Aug 3, 2009 at 2:20 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 One thing we have done that seems to help is in the link_to_remote set an 
 effect and make the duration larger than 0.5 seconds, example:

 ?php echo link_to_remote(Link text, array(
    url=module/action,
    update=div_to_update,
    script=true,
    complete=Effect.Appear('div_to_load', { duration : 0.5 })
 )) ?
 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Monday, August 3, 2009 10:45:31 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote page flicker


 Hi,

 I am using ajax helper link_to_remote in the main page. The page that
 gets displayed mentioned in link_to_remote has external javascript
 library calls.

 When the ajax called page loads, i get a flicker.

 Please let me know if any solution to avoid this.

 Regards

 Deepak



 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote page flicker

2009-08-04 Thread Gareth McCumskey

Do you get any Firebug errors that point that out as the cause. If you were 
calling functions that weren't defined then there would be some kind of error

- Original Message -
From: DEEPAK BHATIA toreachdee...@gmail.com
To: symfony-users@googlegroups.com
Sent: Tuesday, August 4, 2009 8:20:42 AM GMT +02:00 Harare / Pretoria
Subject: [symfony-users] Re: link_to_remote page flicker


Hi,

This wait is for making page/template available on the main page.

But I think the problem I am facing is that Yahoo Javascript library
is available on main page but its called library functions is in main
page.

Regards

Deepak

On Mon, Aug 3, 2009 at 4:21 PM, DEEPAK BHATIAtoreachdee...@gmail.com wrote:
 Hi,

 It is still not helping.

 Thanks

 Deepak

 On Mon, Aug 3, 2009 at 2:20 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 One thing we have done that seems to help is in the link_to_remote set an 
 effect and make the duration larger than 0.5 seconds, example:

 ?php echo link_to_remote(Link text, array(
    url=module/action,
    update=div_to_update,
    script=true,
    complete=Effect.Appear('div_to_load', { duration : 0.5 })
 )) ?
 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Monday, August 3, 2009 10:45:31 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote page flicker


 Hi,

 I am using ajax helper link_to_remote in the main page. The page that
 gets displayed mentioned in link_to_remote has external javascript
 library calls.

 When the ajax called page loads, i get a flicker.

 Please let me know if any solution to avoid this.

 Regards

 Deepak



 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote page flicker

2009-08-04 Thread DEEPAK BHATIA
Hi,

I am not getting firebug errors but the flicker is less in Firefox.

I get the following error in IE though.

Thanks

Deepak Bhatia

On Tue, Aug 4, 2009 at 12:23 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 Do you get any Firebug errors that point that out as the cause. If you were 
 calling functions that weren't defined then there would be some kind of error

 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Tuesday, August 4, 2009 8:20:42 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] Re: link_to_remote page flicker


 Hi,

 This wait is for making page/template available on the main page.

 But I think the problem I am facing is that Yahoo Javascript library
 is available on main page but its called library functions is in main
 page.

 Regards

 Deepak

 On Mon, Aug 3, 2009 at 4:21 PM, DEEPAK BHATIAtoreachdee...@gmail.com wrote:
 Hi,

 It is still not helping.

 Thanks

 Deepak

 On Mon, Aug 3, 2009 at 2:20 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 One thing we have done that seems to help is in the link_to_remote set an 
 effect and make the duration larger than 0.5 seconds, example:

 ?php echo link_to_remote(Link text, array(
    url=module/action,
    update=div_to_update,
    script=true,
    complete=Effect.Appear('div_to_load', { duration : 0.5 })
 )) ?
 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Monday, August 3, 2009 10:45:31 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote page flicker


 Hi,

 I am using ajax helper link_to_remote in the main page. The page that
 gets displayed mentioned in link_to_remote has external javascript
 library calls.

 When the ajax called page loads, i get a flicker.

 Please let me know if any solution to avoid this.

 Regards

 Deepak



 





 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---

attachment: error.JPG

[symfony-users] Re: link_to_remote page flicker

2009-08-03 Thread Gareth McCumskey

One thing we have done that seems to help is in the link_to_remote set an 
effect and make the duration larger than 0.5 seconds, example:

?php echo link_to_remote(Link text, array(
url=module/action,
update=div_to_update,
script=true,
complete=Effect.Appear('div_to_load', { duration : 0.5 })
)) ?
- Original Message -
From: DEEPAK BHATIA toreachdee...@gmail.com
To: symfony-users@googlegroups.com
Sent: Monday, August 3, 2009 10:45:31 AM GMT +02:00 Harare / Pretoria
Subject: [symfony-users] link_to_remote page flicker


Hi,

I am using ajax helper link_to_remote in the main page. The page that
gets displayed mentioned in link_to_remote has external javascript
library calls.

When the ajax called page loads, i get a flicker.

Please let me know if any solution to avoid this.

Regards

Deepak



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote page flicker

2009-08-03 Thread DEEPAK BHATIA

Hi,

It is still not helping.

Thanks

Deepak

On Mon, Aug 3, 2009 at 2:20 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 One thing we have done that seems to help is in the link_to_remote set an 
 effect and make the duration larger than 0.5 seconds, example:

 ?php echo link_to_remote(Link text, array(
    url=module/action,
    update=div_to_update,
    script=true,
    complete=Effect.Appear('div_to_load', { duration : 0.5 })
 )) ?
 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Monday, August 3, 2009 10:45:31 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote page flicker


 Hi,

 I am using ajax helper link_to_remote in the main page. The page that
 gets displayed mentioned in link_to_remote has external javascript
 library calls.

 When the ajax called page loads, i get a flicker.

 Please let me know if any solution to avoid this.

 Regards

 Deepak



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote - Ajax Call

2009-07-30 Thread Gareth McCumskey

Can we see your link_to_remote code?


- Original Message -
From: DEEPAK BHATIA toreachdee...@gmail.com
To: symfony-users@googlegroups.com
Sent: Thursday, July 30, 2009 9:56:05 AM GMT +02:00 Harare / Pretoria
Subject: [symfony-users] link_to_remote - Ajax Call


Hi,

I am using link_to_remote Ajax call from the main page.

The module called from link_to_remote uses external javascript
library. This external javascript library files location are put on
the main page using

script type=text/javascript src=/crb/.../script.

When I click on the link_to_remote hyperlink and the module is
displayed on the main page, I get a flicker.

Should I put the path of the external JS files in the module called.

Thanks

Deepak Bhatia



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote - Ajax Call

2009-07-30 Thread DEEPAK BHATIA
Hi,

Please find my link_to_remote code.

There is a script tag at the bottom of the page but it's related css
and js files are in main page.

Thanks

Deepak Bhatia

On Thu, Jul 30, 2009 at 2:17 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 Can we see your link_to_remote code?


 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Thursday, July 30, 2009 9:56:05 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote - Ajax Call


 Hi,

 I am using link_to_remote Ajax call from the main page.

 The module called from link_to_remote uses external javascript
 library. This external javascript library files location are put on
 the main page using

 script type=text/javascript src=/crb/.../script.

 When I click on the link_to_remote hyperlink and the module is
 displayed on the main page, I get a flicker.

 Should I put the path of the external JS files in the module called.

 Thanks

 Deepak Bhatia



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---

attachment: cancelSuccess.php


[symfony-users] Re: link_to_remote - Ajax Call

2009-07-30 Thread Gareth McCumskey

Well Actually I was referring to just the line of code that calls the 
link_to_remote helper...


- Original Message -
From: DEEPAK BHATIA toreachdee...@gmail.com
To: symfony-users@googlegroups.com
Sent: Thursday, July 30, 2009 10:58:31 AM GMT +02:00 Harare / Pretoria
Subject: [symfony-users] Re: link_to_remote - Ajax Call

Hi,

Please find my link_to_remote code.

There is a script tag at the bottom of the page but it's related css
and js files are in main page.

Thanks

Deepak Bhatia

On Thu, Jul 30, 2009 at 2:17 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 Can we see your link_to_remote code?


 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Thursday, July 30, 2009 9:56:05 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote - Ajax Call


 Hi,

 I am using link_to_remote Ajax call from the main page.

 The module called from link_to_remote uses external javascript
 library. This external javascript library files location are put on
 the main page using

 script type=text/javascript src=/crb/.../script.

 When I click on the link_to_remote hyperlink and the module is
 displayed on the main page, I get a flicker.

 Should I put the path of the external JS files in the module called.

 Thanks

 Deepak Bhatia



 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote - Ajax Call

2009-07-30 Thread DEEPAK BHATIA

Hello,

Please find the line below

?php echo link_to_remote(image_tag('/crb/web/images/cancel.gif'),
array('update' = 'common_area','url'  =
'cancel/cancel?id='.$currentdate,'script' = true,)); ?

I have one question that I am using Ajax library of prototypejs but
datatable javascript library of Yahoo ?

Shall I use the Ajax calls of Yahoo library itself ?

Regards

Deepak Bhatia


On Thu, Jul 30, 2009 at 5:47 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 Well Actually I was referring to just the line of code that calls the 
 link_to_remote helper...


 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Thursday, July 30, 2009 10:58:31 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] Re: link_to_remote - Ajax Call

 Hi,

 Please find my link_to_remote code.

 There is a script tag at the bottom of the page but it's related css
 and js files are in main page.

 Thanks

 Deepak Bhatia

 On Thu, Jul 30, 2009 at 2:17 PM, Gareth McCumskeygmccums...@gmail.com wrote:

 Can we see your link_to_remote code?


 - Original Message -
 From: DEEPAK BHATIA toreachdee...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Thursday, July 30, 2009 9:56:05 AM GMT +02:00 Harare / Pretoria
 Subject: [symfony-users] link_to_remote - Ajax Call


 Hi,

 I am using link_to_remote Ajax call from the main page.

 The module called from link_to_remote uses external javascript
 library. This external javascript library files location are put on
 the main page using

 script type=text/javascript src=/crb/.../script.

 When I click on the link_to_remote hyperlink and the module is
 displayed on the main page, I get a flicker.

 Should I put the path of the external JS files in the module called.

 Thanks

 Deepak Bhatia



 




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-24 Thread DEEPAK BHATIA

Hi,

Thanks for the info. But the code below in test2Success.php is YUI
Javascript code which is not running. Please help me in this

=


link rel=stylesheet type=text/css
href=http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css; /
link rel=stylesheet type=text/css
href=http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css;
/
script type=text/javascript
src=http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js;/script
script type=text/javascript
src=http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js;/script
script type=text/javascript
src=http://yui.yahooapis.com/2.7.0/build/datasource/datasource-min.js;/script
script type=text/javascript
src=http://yui.yahooapis.com/2.7.0/build/autocomplete/autocomplete-min.js;/script


body class= yui-skin-sam

div id=myAutoComplete
input id=myInput type=text
div id=myContainer/div
/div

script type=text/javascript
YAHOO.example.BasicRemote = function() {
// Use an XHRDataSource
var oDS = new YAHOO.util.XHRDataSource(/crb/ysearch_flat.php);
// Set the responseType
oDS.responseType = YAHOO.util.XHRDataSource.TYPE_TEXT;
// Define the schema of the delimited results
oDS.responseSchema = {
recordDelim: \n,
fieldDelim: \t
};


// Instantiate the AutoComplete
var oAC = new YAHOO.widget.AutoComplete(myInput, myContainer, oDS);
oAC.useShadow = true;
oAC.maxResultsDisplayed = 39;
oAC.forceSelection = true;
oAC.typeAhead = true;
oDS: oDS,
oAC: oAC
};
}();
/script

On Fri, Jul 24, 2009 at 11:16 AM, Frank Stelzerd...@bleedingmoon.de wrote:

 You need the script flag in your remote function call, otherwise you
 permit to execute javascript within ajax responses:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


 Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.





 


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-24 Thread Frank Stelzer

But your former posted ajax template works (the alert example)?? Why  
the hell do use the body tag there? ...
The body tag should be listed in your decoration template.


Am 24.07.2009 um 08:34 schrieb DEEPAK BHATIA:


 Hi,

 Thanks for the info. But the code below in test2Success.php is YUI
 Javascript code which is not running. Please help me in this

 =


 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css; /
 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css
  
 
 /
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js 
 /script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/animation/animation- 
 min.js/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/datasource/datasource- 
 min.js/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/autocomplete/autocomplete-min.js 
 /script


 body class= yui-skin-sam

 div id=myAutoComplete
input id=myInput type=text
div id=myContainer/div
 /div

 script type=text/javascript
 YAHOO.example.BasicRemote = function() {
// Use an XHRDataSource
var oDS = new YAHOO.util.XHRDataSource(/crb/ysearch_flat.php);
// Set the responseType
oDS.responseType = YAHOO.util.XHRDataSource.TYPE_TEXT;
// Define the schema of the delimited results
oDS.responseSchema = {
recordDelim: \n,
fieldDelim: \t
};


// Instantiate the AutoComplete
var oAC = new YAHOO.widget.AutoComplete(myInput, myContainer,  
 oDS);
oAC.useShadow = true;
oAC.maxResultsDisplayed = 39;
oAC.forceSelection = true;
oAC.typeAhead = true;
oDS: oDS,
oAC: oAC
};
 }();
 /script

 On Fri, Jul 24, 2009 at 11:16 AM, Frank Stelzerd...@bleedingmoon.de  
 wrote:

 You need the script flag in your remote function call, otherwise  
 you
 permit to execute javascript within ajax responses:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


 Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not  
 when it
 is called as link_to_remote.











 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-24 Thread DEEPAK BHATIA

Hi,

I have removed the body tag from test2Success.php. Even then it is not running.

Regards

Deepak

On Fri, Jul 24, 2009 at 12:04 PM, DEEPAK BHATIAtoreachdee...@gmail.com wrote:
 Hi,

 Thanks for the info. But the code below in test2Success.php is YUI
 Javascript code which is not running. Please help me in this

 =


 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css; /
 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css;
 /
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js;/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js;/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/datasource/datasource-min.js;/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/autocomplete/autocomplete-min.js;/script


 body class= yui-skin-sam

 div id=myAutoComplete
    input id=myInput type=text
    div id=myContainer/div
 /div

 script type=text/javascript
 YAHOO.example.BasicRemote = function() {
    // Use an XHRDataSource
    var oDS = new YAHOO.util.XHRDataSource(/crb/ysearch_flat.php);
    // Set the responseType
    oDS.responseType = YAHOO.util.XHRDataSource.TYPE_TEXT;
    // Define the schema of the delimited results
    oDS.responseSchema = {
        recordDelim: \n,
        fieldDelim: \t
    };


    // Instantiate the AutoComplete
    var oAC = new YAHOO.widget.AutoComplete(myInput, myContainer, oDS);
    oAC.useShadow = true;
    oAC.maxResultsDisplayed = 39;
    oAC.forceSelection = true;
    oAC.typeAhead = true;
        oDS: oDS,
        oAC: oAC
    };
 }();
 /script

 On Fri, Jul 24, 2009 at 11:16 AM, Frank Stelzerd...@bleedingmoon.de wrote:

 You need the script flag in your remote function call, otherwise you
 permit to execute javascript within ajax responses:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


 Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.





 


 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-24 Thread DEEPAK BHATIA

Hi,

I have removed the body tag even then the yahoo ui is not working.

Regards

Deepak Bhatia


On Fri, Jul 24, 2009 at 12:11 PM, Frank Stelzerd...@bleedingmoon.de wrote:

 But your former posted ajax template works (the alert example)?? Why
 the hell do use the body tag there? ...
 The body tag should be listed in your decoration template.


 Am 24.07.2009 um 08:34 schrieb DEEPAK BHATIA:


 Hi,

 Thanks for the info. But the code below in test2Success.php is YUI
 Javascript code which is not running. Please help me in this

 =


 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css; /
 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css
 
 /
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js
 /script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/animation/animation-
 min.js/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/datasource/datasource-
 min.js/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/autocomplete/autocomplete-min.js
 /script


 body class= yui-skin-sam

 div id=myAutoComplete
    input id=myInput type=text
    div id=myContainer/div
 /div

 script type=text/javascript
 YAHOO.example.BasicRemote = function() {
    // Use an XHRDataSource
    var oDS = new YAHOO.util.XHRDataSource(/crb/ysearch_flat.php);
    // Set the responseType
    oDS.responseType = YAHOO.util.XHRDataSource.TYPE_TEXT;
    // Define the schema of the delimited results
    oDS.responseSchema = {
        recordDelim: \n,
        fieldDelim: \t
    };


    // Instantiate the AutoComplete
    var oAC = new YAHOO.widget.AutoComplete(myInput, myContainer,
 oDS);
    oAC.useShadow = true;
    oAC.maxResultsDisplayed = 39;
    oAC.forceSelection = true;
    oAC.typeAhead = true;
        oDS: oDS,
        oAC: oAC
    };
 }();
 /script

 On Fri, Jul 24, 2009 at 11:16 AM, Frank Stelzerd...@bleedingmoon.de
 wrote:

 You need the script flag in your remote function call, otherwise
 you
 permit to execute javascript within ajax responses:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


 Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not
 when it
 is called as link_to_remote.











 


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-24 Thread DEEPAK BHATIA

Hello,

Yes it is working now.

Thanks

Deepak

On Fri, Jul 24, 2009 at 12:47 PM, DEEPAK BHATIAtoreachdee...@gmail.com wrote:
 Hi,

 I have removed the body tag even then the yahoo ui is not working.

 Regards

 Deepak Bhatia


 On Fri, Jul 24, 2009 at 12:11 PM, Frank Stelzerd...@bleedingmoon.de wrote:

 But your former posted ajax template works (the alert example)?? Why
 the hell do use the body tag there? ...
 The body tag should be listed in your decoration template.


 Am 24.07.2009 um 08:34 schrieb DEEPAK BHATIA:


 Hi,

 Thanks for the info. But the code below in test2Success.php is YUI
 Javascript code which is not running. Please help me in this

 =


 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css; /
 link rel=stylesheet type=text/css
 href=http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css
 
 /
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js
 /script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/animation/animation-
 min.js/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/datasource/datasource-
 min.js/script
 script type=text/javascript
 src=http://yui.yahooapis.com/2.7.0/build/autocomplete/autocomplete-min.js
 /script


 body class= yui-skin-sam

 div id=myAutoComplete
    input id=myInput type=text
    div id=myContainer/div
 /div

 script type=text/javascript
 YAHOO.example.BasicRemote = function() {
    // Use an XHRDataSource
    var oDS = new YAHOO.util.XHRDataSource(/crb/ysearch_flat.php);
    // Set the responseType
    oDS.responseType = YAHOO.util.XHRDataSource.TYPE_TEXT;
    // Define the schema of the delimited results
    oDS.responseSchema = {
        recordDelim: \n,
        fieldDelim: \t
    };


    // Instantiate the AutoComplete
    var oAC = new YAHOO.widget.AutoComplete(myInput, myContainer,
 oDS);
    oAC.useShadow = true;
    oAC.maxResultsDisplayed = 39;
    oAC.forceSelection = true;
    oAC.typeAhead = true;
        oDS: oDS,
        oAC: oAC
    };
 }();
 /script

 On Fri, Jul 24, 2009 at 11:16 AM, Frank Stelzerd...@bleedingmoon.de
 wrote:

 You need the script flag in your remote function call, otherwise
 you
 permit to execute javascript within ajax responses:
 http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


 Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not
 when it
 is called as link_to_remote.











 


 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-23 Thread Szabolcs Heilig
Hi,
I think your problem is based on the behavior of Symfony
in AJAX mode. When you load your action through
link_to_remote() it doesn't decorate that with your layout.
Without that it is possible to your ui-magic never initialized.

2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-23 Thread DEEPAK BHATIA

Hi,

The code in javascript section in test2Success.php is not executed.
Why is that when link_to_remote is called, the associated
action/module doesn't execute Javascript code ?

=
My main page has the following code

?php echo link_to_remote('Delete this post', array( 'update'   =
'feedback','url' = 'test/test2',)) ?

div id=feedback
/div



test2Success.php has the following code
===

body
h1TEST/h1

script type=text/javascript
alert(TEST);
/script
/body
===



On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: link_to_remote

2009-07-23 Thread Frank Stelzer

You need the script flag in your remote function call, otherwise you  
permit to execute javascript within ajax responses:
http://www.symfony-project.org/book/1_2/11-Ajax-Integration#chapter_11_sub_authorizing_script_execution


Am 24.07.2009 um 07:41 schrieb DEEPAK BHATIA:


 Hi,

 The code in javascript section in test2Success.php is not executed.
 Why is that when link_to_remote is called, the associated
 action/module doesn't execute Javascript code ?

 =
 My main page has the following code

 ?php echo link_to_remote('Delete this post', array( 'update'   =
 'feedback','url' = 'test/test2',)) ?

 div id=feedback
 /div

 

 test2Success.php has the following code
 ===

 body
 h1TEST/h1

 script type=text/javascript
 alert(TEST);
 /script
 /body
 ===



 On Fri, Jul 24, 2009 at 1:42 AM, Szabolcs
 Heiligszabolcs.hei...@gmail.com wrote:
 Hi,
 I think your problem is based on the behavior of Symfony
 in AJAX mode. When you load your action through
 link_to_remote() it doesn't decorate that with your layout.
 Without that it is possible to your ui-magic never initialized.
 2009/7/23 DEEPAK BHATIA toreachdee...@gmail.com

 I have a web page which is referenced by link_to_remote action.

 This web page/template has yahoo user interface javascript api's.

 When I call this page as normal form submission, I get the
 functionality of yahoo user interface javascript api but not when it
 is called as link_to_remote.





 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---