www.webdeveloper.com
Results 1 to 7 of 7

Thread: [RESOLVED] jquery custom callback

  1. #1
    Join Date
    Feb 2006
    Posts
    86

    resolved [RESOLVED] jquery custom callback

    Can't manage calling custom callback function with ajax response.
    $.post("mails", { "type": p }, myfunc(data));

    where myfunc() supposed to alert .resposeText
    however, $.post("mails", { "type": p }, function(data){ myfunc(data) } );
    is not what i'm looking for.

    Thanks in advance. =)

  2. #2
    Join Date
    Feb 2006
    Posts
    86
    any ideas ?

  3. #3
    Join Date
    Feb 2006
    Posts
    86
    anyone ?

  4. #4
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    You can do either

    $.post("mails", { "type": p }, function(data){ myfunc(data) } );

    or

    $.post("mails", { "type": p }, myfunc);
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  5. #5
    Join Date
    Feb 2006
    Posts
    86
    Thanks for reply Jeff,
    but the first way leads to a creation of useless function that calls another function.. unnecessary step..
    How do I get the response text with the second call ? I need to pass the 'data' as a parameter somehow.
    Do I?
    I need myfunc to alert data. How do I do it the second way ?

  6. #6
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    jQuery will pass arguments "data" and "textStatus" to the callback function. All your myfunc has to do is use those parameters.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  7. #7
    Join Date
    Feb 2006
    Posts
    86
    Much thanks Jeff =)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles