CodeIgniter Forums
Displaying div in fancybox - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Displaying div in fancybox (/showthread.php?tid=39903)



Displaying div in fancybox - El Forum - 03-24-2011

[eluser]Wonder Woman[/eluser]
Hi there,

I have a form where I want a div, which is currently hidden, to display in a fancybox when activated and then go back hidden once the form in this div has been submitted...I currently have it working but no content appears in the div...could you help me?

Thanks, this is my view code:

Code:
$(document).ready(function(){
  $('div#fancyBoxLink').click(function() {
    $.fancybox({
      overlayOpacity: 0.8,
      overlayColor: '#000',
      type: 'iframe',
      width: 500,
      height: 270,
     'scrolling' : 'no',
      padding: 0,
      href: '<?=base_url();?>admin/news_manager/add_article'
});            
return false;

<div id="fancyBoxLink">test</div>
&lt;?php
echo '<div style="display:none">';
echo '<div id="upload_images">';
echo '<p>'.form_label('Choose a File', 'upload').'</p> ';
echo '&lt;input type="file" name="Filedata" id="upload" /&gt;';
echo '<p><a href="[removed]$(\'#upload\').uploadifyUpload();">Upload File(s)</a></p>';
echo '<div id="image_gallery"></div>';
echo '</div>';
echo '</div>';
?&gt;