Multiple data in .ajax() function
#1

Hi guys
I'm making my UCP and I got stuck when I want to send multiple data using .ajax function, here is the code!

this is how I tried:

Code:
else
	{
		var area_str = "edit_ban_textarea=" + value;
		var id_val = "edit_ban_id=" + id;
		$.ajax({
			type: 'POST',
			url: 'edit_ban.php',
			data: "edit_ban_textarea=" + $.toJSON(value) + "&edit_ban_id=" + $.toJSON(id),
			success: function(response) {
				$('#edit_ban_error_report').css({'border':'1px solid #098fc7', 'padding':'5px 5px 5px 5px', 'width': '81.6%', 'background':'#94ddfb', 'color':'white'}).html('<center>'+response+'</center>');
				setTimeout('FadeOutBanEdit(\''+element_remove_textarea+'\', \''+response+'\')', 3000);
			}
		});
	}
Reply


Messages In This Thread
Multiple data in .ajax() function - by System64 - 19.03.2012, 19:18
Re: Multiple data in .ajax() function - by XFlawless - 20.03.2012, 05:48
Re: Multiple data in .ajax() function - by System64 - 20.03.2012, 20:16

Forum Jump:


Users browsing this thread: 2 Guest(s)