how to cloase a jquery fancybox from button click
i'm using [fancy box][1] to create a popup and load another page on it using an iframe. here is my code

    	<script type="text/javascript">
	$(document).ready(function() {
	
		$('.calendar .day').click(function() {
			day_num = $(this).find('.day_num').html();
			day_data = prompt('Enter Stuff', $(this).find('.content').html());
			if (day_data != null) {
				
				$.ajax({
					url: window.location,
					type: 'POST',
					data: {
						day: day_num,
						data: day_data
					},
					success: function(msg) {
						location.reload();
					}						
				});
				}
			});
		});
	$(document).ready(function(){
		$("a.iframeFancybox1").fancybox({
		'width'		      :	800,
		'height'		      :	650,
		'overlayOpacity'	 :	'0.4',
		'overlayColor'		 :	'#000',
		'hideOnContentClick' :   false,
		'autoScale'     	 :   false,
   		'transitionIn'		 :   'elastic',
		'transitionOut'	 :   'elastic',
		'type'			 :   'iframe'
		});
	});

	</script>
it loads the page successfully and do the stuff. but instead of closing the popup form it loads the popup source form inside the popup itself. i want to close the popup form when the work done and return to the main menu page which the popup was generated. how to achieve this on a button click of the popup form.
  [1]: http://fancybox.net/home

regards
Rangana
how to cloase a jquery fancybox from button click
===

i'm using [fancy box][1] to create a popup and load another page on it using an iframe. here is my code

    	<script type="text/javascript">
	$(document).ready(function() {
	
		$('.calendar .day').click(function() {
			day_num = $(this).find('.day_num').html();
			day_data = prompt('Enter Stuff', $(this).find('.content').html());
			if (day_data != null) {
				
				$.ajax({
					url: window.location,
					type: 'POST',
					data: {
						day: day_num,
						data: day_data
					},
					success: function(msg) {
						location.reload();
					}						
				});
				}
			});
		});
	$(document).ready(function(){
		$("a.iframeFancybox1").fancybox({
		'width'		      :	800,
		'height'		      :	650,
		'overlayOpacity'	 :	'0.4',
		'overlayColor'		 :	'#000',
		'hideOnContentClick' :   false,
		'autoScale'     	 :   false,
   		'transitionIn'		 :   'elastic',
		'transitionOut'	 :   'elastic',
		'type'			 :   'iframe'
		});
	});

	</script>
it loads the page successfully and do the stuff. but instead of closing the popup form it loads the popup source form inside the popup itself. i want to close the popup form when the work done and return to the main menu page which the popup was generated. how to achieve this on a button click of the popup form.
  [1]: http://fancybox.net/home

regards
Rangana