CreateBlogListing.checkMatchesCallback = function( respData ) { $( "#blogListingMatches" ).html('<span class="matches-info">' + (respData ? respData : '0') + ' <?php echo wfMsg('create-blog-listing-matches-info'); ?> </span>'); $( "#blogListingCalculateMatches" ).val('<?php echo wfMsg('create-blog-listing-matches-recalculate'); ?> '); }; CreateBlogListing.checkMatches = function (e) { var listingCategories = $( "#wpCategoryTextarea1" ).val(); //var listingAuthors = YD.get( "blogListingAuthors" ).value; $( "#blogListingMatches" ).html('<?php echo Wikia::ImageProgress(); ?> '); $.get(wgAjaxPath, {action: "ajax", rs: "CreateBlogListingPage::axBlogListingCheckMatches", categories: encodeURIComponent(listingCategories)}, CreateBlogListing.checkMatchesCallback); }; $(document).ready( function () { $('#blogListingCalculateMatches').click( CreateBlogListing.checkMatches ); } ); /*]]>*/ </script> <strong><?php echo wfMsg("create-blog-listing-form-title"); ?> </strong><br /> <?php