{"id":348,"date":"2022-08-30T14:59:51","date_gmt":"2022-08-30T14:59:51","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/06\/problem-about-out-of-band-collection-of-common-programming-errors\/"},"modified":"2022-08-30T14:59:51","modified_gmt":"2022-08-30T14:59:51","slug":"problem-about-out-of-band-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-out-of-band-collection-of-common-programming-errors\/","title":{"rendered":"problem about out-of-band-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dbb19915c39391b3ce5ba7a81e694dc9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPatrick<br \/>\njquery ajax asynchronous callback out-of-band<br \/>\nI have a click handler bound to a list of radio buttons.When someone clicks any of these buttons, an ajax request is performed, which goes away to a server, and comes back with some data, which is injected into the page.$(&#8216;ul#tag_picker&#8217;).find(&#8216;input&#8217;).click(function(e){var type = ($(this).attr(&#8216;type&#8217;) == &#8216;radio&#8217;) ? &#8216;radio&#8217; : &#8216;checkbox&#8217;;if($(&#8216;ul#tag_picker input[type=&#8221;radio&#8221;]:checked&#8217;).length &lt; 1 &amp;&amp; type === &#8216;checkbox&#8217;){ e.preventDefault();return false;}var value = $(this).val();var word = $(this).siblings(&#8216;label&#8217;).text();tag = {};tag.tag_id = value;tag.tag_word = word;tag.jumper = di.tags.jumpers[0];\/\/tag.privilege = ui.item.privilege;args = {};args[&#8216;jumper&#8217;] = di.tags.jumpers[0];args[&#8216;name&#8217;] = &#8216;selected_tags[]&#8217;;\/\/args[&#8216;class&#8217;] = &#8216;tag genre_tag&#8217;;tag.privilege = &#8216;genre&#8217;;if (type === &#8216;radio&#8217;){args[&#8216;main_tag&#8217;] = true;}else if ( $(this).siblings(&#8216;input[type=&#8221;radio&#8221;]:first&#8217;).is(&#8216;:checked&#8217;) ){$(this).attr(&#8216;checked&#8217;,&#8217;checked&#8217;);return false; }action = ($(this).is(&#8216;:checked&#8217;)) ? &#8216;add&#8217; : &#8216;remove&#8217;;user_select_tag(tag, action, args); \/\/<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-06 03:13:27. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Patrick jquery ajax asynchronous callback out-of-band I have a click handler bound to a list of radio buttons.When someone clicks any of these buttons, an ajax request is performed, which goes away to a server, and comes back with some data, which is injected into the page.$(&#8216;ul#tag_picker&#8217;).find(&#8216;input&#8217;).click(function(e){var type = ($(this).attr(&#8216;type&#8217;) == &#8216;radio&#8217;) ? &#8216;radio&#8217; : [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-348","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=348"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}