Bug Tracker

Modify

Ticket #2258 (closed enhancement: invalid)

Opened 5 years ago

Last modified 5 years ago

Ajax sending data to response functions

Reported by: Bash Owned by:
Priority: minor Milestone: 1.2.4
Component: ajax Version: 1.2.2
Keywords: Cc:
Blocking: Blocked by:

Description

When a response comes back from AJAX, there's no way to refer it to a particular object (especially if that object itself is dynamic). I am requesting a syntax such as the following:

var element = 

jQuery.ajax (
{
	async:		false
	type:		'GET',
	url:		'url.php',
	cache:		false,
	dataType:	'xml',
	passThru:	{ object: element }
	success:	function (dataResponse, passThru)
	{
		// Will alert the 'element' item.
		alert (passThru.object);
	}
}
);

Change History

comment:1 Changed 5 years ago by flesler

  • Priority changed from blocker to minor
  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone changed from 1.2.3 to 1.2.4

Yes, you can access the settings hash by using "this". Check  http://docs.jquery.com/Ajax/jQuery.ajax#options.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.