Username
Password
Remember me
Lost Password?
Home
Articles
Web Design
Mixes
Images
Python
Search
Programming
Operating Systems
Producing
DJing
Blog
Jokes
Programming menu
PHP
Python
Apple
Classic ASP
SQL / mysql
AJAX
ASP.NET
CSS
HTML
Javascript
Joomla
Joomla Tutorial
VB / VB.NET
Links
Home
Articles
Programming
How to pass a value to a function for jquery AJAX onsuccess
How to pass a value to a function for jquery AJAX onsuccess
Tag it:
?
User Rating:
/ 1
Poor
Best
Get the value of the variable within the onsuccess function that you passed the function that encloses the jQuery AJAX call.
function test_ajax(myvalue) { jQuery.ajax({ url: 'main_ajax.aspx' ,success: function() { alert( 'success ' + this.myvar ); } ,myvar: myvalue }); } test_ajax('some_value');
Comments
Search
Only registered users can write comments!
Next >
[ Back ]