Tuesday, February 26, 2013

jQuery dialog box with remoteFunction Ajax Call

hi guys,... can someone help me please,... 
I need to call jQuery dialog box from page currently called from remoteFunction,... when I call another remoteFunction in that page, the page is not responding. 

How can I Ajax call without remoteFunction,...? 
this is what I currently have: 

 <script>
  $(function() {
    $( "#photo_comments_dialog" ).dialog({
      autoOpen: false,
width: 500,

    });
 
    $( "#photo_comments_opener" ).click(function() {
      $( "#photo_comments_dialog" ).dialog( "open" );
    });

  });
  </script>


        <div>
<?php echo $html->link(ucfirst(__('report', true)), 'javascript:void(0)', array('id' => 'photo_comments_opener', 'class' => 'report')) ?>
</div>

<div class="clr"></div>

<div id="photo_comments_dialog" title="Report Photo Comment">
<script type="text/javascript">
<?php echo $ajax->remoteFunction(array('url' => array('controller' => 'photo_comment', 'action' => 'report_spam/', $photo_comment['PhotoComment']['id']), 'update' => 'photo_comments_reports')); ?>
</script>
    <div id="photo_comments_reports"></div>
</div>

    <div class="clr"></div> 

is there a way make ajax call without remoteFunction call...?? 

Thanks in advance 
chris


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: