Solved

jquery Dialog with php and ajax

Posted on 2014-03-11
5
671 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

828 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