hi cricket,... 
I did manage that, and the code is slightly different from above,... In my 
case,... and here is the code if anyone needs it: 


<script type="text/javascript">
$(document).ready(function() {
$('#photo_comments_dialog_<?php echo $photo_comment['PhotoComment']['id'] 
?> a').each(function() {
var $link = $(this);
var $dialog = $('<div></div>')
.load($link.attr('href'))
.dialog({
autoOpen: false,
width: 500,
modal: true,
title: 'Report Photo Comment',
});

$link.click(function() {
$dialog.dialog('open');

return false;
});
});
});
</script>

and the link: 
<div id="photo_comments_dialog_<?php echo 
$photo_comment['PhotoComment']['id'] ?>"><?php echo 
$html->link(__('report', true), '/report/photo_comment/' . 
$photo_comment['PhotoComment']['id'], array('class' => 'report')) ?></div> 

thank You guys All ! 
Salute, 
chris


On Saturday, March 9, 2013 3:11:24 PM UTC-8, cricket wrote:
>
> You're getting a new window because your link's click event has 
> window.open() attached to it. 
>
> What does this have to do with CakePHP, anyway? 
>
> On Sat, Mar 9, 2013 at 4:33 PM, Chris <[email protected] <javascript:>> 
> wrote: 
> > hi there,… can you help me please,… 
> > I’m trying to load dialog page, but instead I’m getting new window 
> popup,… 
> > how can I accomplish this,…? 
> > 
> > hi guys,... can anyone help,...? 
> > this is what I got so far,... I'm trying to load jquery dialog page, but 
> > instead I'm getting new window popup,... how can I accomplish this,...? 
> > 
> >  <script> 
> > $(document).ready(function() { 
> > $('#photo_comments_opener_<?php echo 
> $photo_comment['PhotoComment']['id'] 
> > ?>').each(function() { 
> > var $link = $(this); 
> > var $dialog = $('<div></div>') 
> > .load($link.attr('href') + ' #content') 
> > .dialog({ 
> > autoOpen: false, 
> > title: $link.attr('title'), 
> > width: 500, 
> > height: 300 
> > }); 
> > 
> > $link.click(function() { 
> > $dialog.dialog('open'); 
> > 
> > return false; 
> > }); 
> > }); 
> > 
> > }); 
> >   </script> 
> > 
> > and here is the link: 
> > 
> > <?php echo $html->link(__('report/spam', true), '/report/photo_comment/' 
> . 
> > $photo_comment['PhotoComment']['id'], array('id' => 
> > "photo_comments_opener_".$photo_comment['PhotoComment']['id'], 'class' 
> => 
> > 'report',  'onclick' => "window.open(this.href, 'popupwindow', 
> 'width=500, 
> > height=300'); return false;")) ?> 
> > 
> > thanks in advance 
> > chris 
> > 
> > 
> > On Thursday, March 7, 2013 5:23:46 PM UTC-8, Chris wrote: 
> >> 
> >> hi guys,... can anyone help please ,... 
> >> how can I call content from another page into a dialog box without 
> >> remoteFunction,... any other way,...? 
> >> 
> >> <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_".$photo_comment['PhotoComment']['id'] )); ?> 
> >> </script> 
> >> this is what I currently have,... but it's conflicting with 
> remoteFunction 
> >> in remoteFunction page. 
> >> 
> >> 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 [email protected] <javascript:>. 
> > To post to this group, send email to [email protected]<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/cake-php?hl=en. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to