Link to home
Start Free TrialLog in
Avatar of joyacv2
joyacv2Flag for Puerto Rico

asked on

jquery Dialog with php and ajax

Hi,

I have this code inside the document ready jquery..., and works perfect making the append, but i need to change the append to a dialog box

$("td").click(
	
	function (){
		
			$this = $(this);
			$.ajax({
		url:"interrupcionesFeeder.php",
		type:"POST",
		data: {feeder:$(this).html()},success: interrupcionesSeccion});
			
		function interrupcionesSeccion(datos){
		
			$this.append(datos);
		}

Open in new window


and this other

<script type="text/javascript">

$(function(){
	$("#dialog").dialog({
		autoOpen: false,
		show: {
			effect: "blind",
			duration: 1000
		},
		hide: {
			effect: "explode",
			duration:1000
		}
	});
	
	$("#opener").click(function(){
		$("#dialog").dialog("open");
	});
});


</script>

Open in new window


I need to adjust this code for when a user click a td, then run the ajax and the return from the ajax go inside the dialog box, any idea?
Avatar of Gary
Gary
Flag of Ireland image

So just change the append

$this.append(datos);
to
$("#dialog").(datos);
Change the targetting to where it should be appended
Avatar of joyacv2

ASKER

Hi,

I change that line and nothing happens, any other idea?
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joyacv2

ASKER

Hi,

Still not working,, the code don't do anything, any other idea?
Post the HTML of your dialog code.