Solved

jquery Dialog with php and ajax

Posted on 2014-03-11
5
672 Views
Last Modified: 2014-03-28
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
Comment
Question by:joyacv2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39922266
So just change the append

$this.append(datos);
to
$("#dialog").(datos);
Change the targetting to where it should be appended
0
 
LVL 1

Author Comment

by:joyacv2
ID: 39922379
Hi,

I change that line and nothing happens, any other idea?
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39922390
Oops missed something

$("#dialog").append(datos);
0
 
LVL 1

Author Comment

by:joyacv2
ID: 39922405
Hi,

Still not working,, the code don't do anything, any other idea?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39923921
Post the HTML of your dialog code.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question