Fancybox Issues an Usage Discussion

Hello I have and issue with the submit button after show the fancybox. It loses completely the submit functionality.

If I press the Preview link on the grid it will pop up the fancybox, I close it and when I try to press the confirm button it does not work. I got an IE error

I leave you part of the code for your review:




$this->widget('zii.widgets.grid.CGridView', array(

	'id'=>'card-grid',

	'dataProvider'=>$model->search(), 

	'afterAjaxUpdate'=>'function(id, data){ fancyboxRearm("a[rel=myrel]") }', //provide the correct target!!!

	'columns'=>array(

		'first_name',

		'middle_name',

		'last_name',

		'suffix',

		'title_line1',

		'title_line2',

		'phone_main',

		'phone_direct',

		'phone_mobile',

		'phone_fax',

		'phone_noc',

		'email',

		'address',

		

		

		array('name'=>'view_picture', 

				'type'=>'raw', 

				'header'=>'', 

				'value'=> 'CHtml::link("Preview", Yii::app()->createUrl("card/view", array("id"=>$data->id)), array("rel"=>"myrel"))', 

				'htmlOptions'=>array('width'=>'40','style'=>'text-align:center;'), 

		), 

		array( 

                        'id'=>'inline',

                        'class'=>'CButtonColumn',

						'template' => '{delete}', 

						'deleteButtonImageUrl' => false, 

 

		),

	),

)); ?>


	<div style="color:#72a7d9; font-size:12px; font-style:italic; padding:10px 20px 10px 10px; text-align:left; text-align:right;  ">

		<?php echo CHtml::button('Confirm', array('submit' => array('/email/index&id='.$model->id_order), )); ?>

		<?php 

			$confirmOut = Yii::app()->request->baseUrl.'/images/confirm-default.png';

			$confirmOver = Yii::app()->request->baseUrl.'/images/confirm-over.png';

			echo CHtml::imageButton($confirmOut, 

			array('submit' => array('/email/index&id='.$model->id_order), 'id'=>'confirmButton', 'width'=>'156', 'heigth'=>'53', 'onmouseover'=>'this.src=(\''.$confirmOver.'\')', 'onmouseout'=>'this.src=(\''.$confirmOut.'\')')); 

		?>

		

	</div>



HELP!!

1728

comfirm_lost.JPG

I’m using the extension in a very simple way

In my view file :

When browsing to the page in IE, it works but it keeps populating my applicationélog file with error like these:

Someone knows why and how to get rid of these errors ?

Thank you very much!

Hi,

I am not getting the fancybox to load the images that is in the container that the fancybox is loading.

Here is my code:




    <div id="offer_images" class="float_left">

        <?php

            $images = $model->getImages();

            $first = true;

            foreach ($images as $img) {

                if ($first) {

                    $first = false;

                    echo '<div class="offer_main_picture_container"><a href="#" rel="gallery">'.CHtml::image($img->picture_path, "Produktbilde", array('class'=>'offer_main_picture lkj', 'title'=>$img->title)).'</a></div>';

                } else {

                    echo '<div class="offer_picture_container"><a href="#" rel="gallery">'.CHtml::image($img->thumbnail_path, "Produktbilde", array('class'=>'offer_picture', 'title'=>$img->title)).'</a></div>';

                }

            }

        ?>

    </div>

    

    <?php

        $this->widget('ext.fancybox.EFancyBox', array(

            'target'=>'a[rel=gallery]',

            'config'=>array(

                    'scrolling' => 'yes',

                    'titleShow' => true,

                ),

            )

        );

    ?>




The fancybox is loading the awesome popup, but I always get the message: "The requested content cannot be loaded.

Please try again later."

The images are shown in the different <div><a …><img… />, so I know that the images has correct URL.

Please help… Thanks!

OK, I managed to fix the bug myself…

I simply needed to add the url to the image in the anchor tag. Pretty silly that I did not see that earlier.

Thanks very very very very very much :lol:

Hi,

above code doed not show anything i tried please help me

Thanks in advance

Hi,

Any example on how to add youtube links. As the config options from fancybox.net are different for youtube links or swf objects.

Thanks

Yureshwar Ravuri

how to show fancybox in fancybox?

i have some thumbs in my view file

how can i show them by fancybox by clicking on one of theme and walk through by next and prev buttons?