Question : Fancybox Jquery Form

Hi

I have a link to display a user form winthin a fancybox
a perl script gets the data from a database and populates a simple user form Name Contact info etc

on hiting update the same script updates the database & displays a Thank You message this works within a a seperate brouser window.
In the Fancybox window all that happens is the box closes and the parent window refreses and the datbase table remains untouched so i'm unable to tell what is happing because i can't get any message back

I'm using the example from http://fancybox.net/blog

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
Javascript

Attach FancyBox: 
$("a#UsrFrm").fancybox({
	'scrolling'		: 'no',
	'titleShow'		: false,
	'onClosed'		: function() {
	    $("#login_error").hide();
	}
});
Simple validation; submit data using Ajax and display response
$("#login_form").bind("submit", function() {

	if ($("#login_name").val().length < 1 || $("#login_pass").val().length < 1) {
	    $("#login_error").show();
	    $.fancybox.resize();
	    return false;
	}

	$.fancybox.showActivity();

	$.ajax({
		type		: "POST",
		cache	: false,
		url		: "UsrForm.pl",
		data		: $(this).serializeArray(),
		success: function(data) {
			$.fancybox(data);
		}
	});

	return false;
});

Answer : Fancybox Jquery Form

I managed to fix this by calling the child perl script into an iframe
The examle works when the pparent document is a html doc it dosn't work when it is a perl script
Random Solutions  
 
programming4us programming4us