Why not just make the showResponse() function an inner, anonymous function of onSuccess()?
var options = { success: function() { jQuery('div#adv_content').load('inc/ de.application.adv.inc.php?page='+pageNumber); } url: 'inc/application.adv.func.php' } On Jan 11, 9:12 am, antiheld2000 <[EMAIL PROTECTED]> wrote: > hi, > > i got a silly little question: > ho do i pass a variable from a function to a callback? see this > example for better understanding: > > var options = { > success: showResponse, > url: 'inc/application.adv.func.php' > }; > > function showResponse(responseText, statusText) { > jQuery('div#adv_content').load('inc/de.application.adv.inc.php? > page='+pageNumber); > > } > > $('#step1').click(function(){ > var pageNumber = '0'; > $('#myform').ajaxSubmit(options); > return false; > > }); > > can you help me?