?
Solved

jquery Dialog with php and ajax

Posted on 2014-03-11
5
Medium Priority
?
675 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 2000 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

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

766 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