• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

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?
0
joyacv2
Asked:
joyacv2
  • 3
  • 2
1 Solution
 
GaryCommented:
So just change the append

$this.append(datos);
to
$("#dialog").(datos);
Change the targetting to where it should be appended
0
 
joyacv2Author Commented:
Hi,

I change that line and nothing happens, any other idea?
0
 
GaryCommented:
Oops missed something

$("#dialog").append(datos);
0
 
joyacv2Author Commented:
Hi,

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now