hm , ijust tried it, but it didn't work. did i make a mistake?: var options = { success: function() { jQuery('div#adv_content').load('inc/de.application.adv.inc.php? page='+pageNumber); $("body").addClass("curAuto"); }, url: 'inc/application.adv.func.php' }
$('#step1').click(function(){ var pageNumber = '0'; $('#myform').ajaxSubmit(options); return false; }); On Jan 11, 5:06 pm, Steve Brownlee <[EMAIL PROTECTED]> wrote: > 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?