{"id":3572,"date":"2014-03-28T11:01:56","date_gmt":"2014-03-28T11:01:56","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/28\/jquerywoocommercerelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-28T11:01:56","modified_gmt":"2014-03-28T11:01:56","slug":"jquerywoocommercerelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/28\/jquerywoocommercerelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"jquery,woocommerceRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/518bacf2e4ad4e4b8f026f6497221fed?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nflem<br \/>\nphp javascript jquery<br \/>\nI have a couple form elements that when clicked update the database and disappear.At first, I have a button that reads Check In. Upon clicking it, the database is updated and a dropdown is presented in place of the button. In the dropdown, there are locations for the user to choose, that have values of their corresponding location-number, which upon clicking update the database. The last option is labeled Check Out, and upon clicking it, the database is supposed to be updated one last time, and<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7536d8aaec4cce943c647002093748e2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRaphaelDDL<br \/>\nphp jquery ajax json-encode parse-error<br \/>\nI&#8217;m using PHP&#8217;s json_encode() to return some data, retrieved by jQuery&#8217;s ajax():Simplified JS:$.ajax({dataType: &#8216;json&#8217;,contentType: &#8216;application\/json&#8217;,cache: false,type: &#8216;POST&#8217;,url: &#8216;.\/api\/_imgdown.php&#8217;,error: function(jqXHR, textStatus, errorThrow) {console.log(jqXHR, textStatus, errorThrow);},success: function(data, textStatus, jqXHR) {console.log(data, textStatus, jqXHR);} });The PHP is:header(&#8216;Content-Type: application\/json; charset=UTF-8&#8217;); \/\/default apiResponse $apiResponse = [&#8220;status&#8221; =&amp;g<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0898577533c3431064884bad5413676e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nUrbanPlanet<br \/>\njquery jquery-ui autocomplete asp.net-mvc-4<br \/>\nList itemI am looking at the JQUERY example on the http:\/\/jsfiddle.net\/g4stL\/212\/ link in Jsfiddle website. I am very impressed by the feature. Infact we have to implement the exact same feature on our application.If I copy the code as it is, I am able to see the multicolumn autocomplete. However the selection part does not work. If I select using mouse cursor or using Arrow keys the program fails. The error I get is &#8220;htmlfile: Unexpected call to method or property access.&#8221;In the append function<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/518851ee48f8750a49a132f83e3ef083?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nradleybobins<br \/>\njavascript jquery live<br \/>\nso I keep getting the error: employeesScript.js:3Uncaught SyntaxError: Unexpected token {. It is driving me nuts because I can&#8217;t figure out what is causing it. I also ran it through JSFiddle and got the following error: Error: Problem at line 3 character 50: Expected &#8216;)&#8217; and instead saw &#8216;{&#8216;. $(&#8220;.employeesPostHours&#8221;).live(&#8220;click&#8221;, fuction() {Problem at line 3 character 51: Missing semicolon. $(&#8220;.employeesPostHours&#8221;).live(&#8220;click&#8221;, fuction() {Problem at line 45 character 1: Expected &#8216;(end)&#8217; and i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/100004048546344\/picture?type=large\" \/><br \/>\nMichelle Cantin<br \/>\njavascript jquery wordpress wordpress-theming<br \/>\nMy custom JQuery file as well as Masonry Jquery are linked but not working.You can see that it links correctly in the source file: view-source:http:\/\/michellecantin.ca\/test\/features\/notification-boxes\/JQuery is also linked and I&#8217;m pretty sure it is working.Why aren&#8217;t my scripts working?ps: I use it in a wordpress theme.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0687d6788412d00618c7bc438e500cb6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAleksandr M<br \/>\njquery parsing<br \/>\nI want to be able to identify when the first child of a text string is an element or a text node so for example:I was thinking of doing: $(&#8216;&lt;span&gt;&#8217;+my_html_string+'&lt;\/span&gt;&#8217;).children().is(&#8216;*&#8217;)But this doesn&#8217;t always work.1: The first child is text. some examples:&lt;span&gt;some text&lt;span&gt; \/\/works using above code &lt;div&gt;here is some &lt;span&gt;text&lt;\/span&gt;&lt;\/div&gt; \/\/fails using above code &lt;pre&gt;check out my text&lt;\/pre&gt; \/\/works2: the first child is any e<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3c6a7d6d501c29dfc37d972803690bbe?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nelisium<br \/>\njquery internet-explorer rounded-corners corners<br \/>\nI&#8217;m using corners plugin from here &#8211; http:\/\/malsup.com\/jquery\/corner\/ It works fine in Chrome and FF, but IE8 says that there is &#8220;Unexpected method call or property request jquery.corner.js, string 147 symbol 17. Here is the 147th string from pluginbot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);Here is se code on my page:&lt;script src=&#8221;js\/jquery.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt; &lt;script src=&#8221;js\/jquery.corner.js&#8221; type=&#8221;text\/javascript&#8221;&gt;&lt;\/script&gt; &lt;scr<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/84593578e7bf8129d4e50eba3d11ba7f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlizain Prasla<br \/>\nphp jquery ajax<br \/>\nI am Submiting form through MOUSE CLICK and ENTER too.Ajax Call is checking is there any designation which i already in DATABASE.. If not, user can submit form otherwise SUBMIT button will DISABLEJQUERYfunction check_designation(e){text = $(&#8216;#req1&#8217;).val();data = &#8220;data=&#8221; + text; text_length = text.length if(text_length == 0){$(&#8216;#result_span&#8217;).html(&#8221;);} if(text_length &gt; 3 ){$.ajax({url: &#8220;designation_ajax.php&#8221;,type: &#8220;POST&#8221;,data: data, cache: false,success: function (<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e6488132d206883770017ba97d0f521f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSilentGhost<br \/>\njquery html<br \/>\nI&#8217;m trying to get the value of a few checkboxes and enter them in a hidden form field, is there a way to do that in jQuery,my checkboxes look like this&lt;form&gt;&lt;input type=&#8221;checkbox&#8221; name=&#8221;chicken&#8221; id=&#8221;chicken&#8221; \/&gt;Chicken&lt;input type=&#8221;checkbox&#8221; name=&#8221;meat&#8221; id=&#8221;meat&#8221; \/&gt;Meat &lt;\/form&gt;&lt;form method=&#8221;post&#8221; action=&#8221;&#8221;&gt;&lt;input type=&#8221;hidden&#8221; name=&#8221;my-item-name&#8221; value=&#8221;&#8221; \/&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;my-add-button&#8221; value=&#8221; add &#8221; \/&gt; &lt;\/form&gt;I only need to submit the h<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a7263d0aad8f750b83d52b6a58a44b4b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMark Richman<br \/>\nasp.net jquery jquery-ui dialog confirm<br \/>\nI have a TemplateField in a GridView in an UpdatePanel with a button called btnDelete. Rather than the standard OnClientClick=&#8221;return confirm(&#8216;Are you sure?&#8217;)&#8221; I&#8217;d like to use jQuery Dialog.So far, I&#8217;m able to set the jQuery using btnDelete.Attributes[&#8220;onclick&#8221;] and setting the jQuery Dialog code in the code-behind. However, it posts back to the server in all cases before I have a chance to click &#8220;Confirm&#8221; or &#8220;Cancel&#8221;. Here is the HTML it produces:&lt;input type=&#8221;submit&#8221; rel=&#8221;Are you sure?&#8221; clas<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/be2993693b2d0c9f004a3bab339e7458?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser3084340<br \/>\nphp wordpress woocommerce<br \/>\nThis question already has an answer here:Reference &#8211; What does this error mean in PHP?23 answersHi I&#8217;m getting this error message Parse error: syntax error, unexpected end of file in woocommerce.php on line 56, when I am trying to view my products in woocommerce. Here is the code for that file. Line 56 is the last line.&#8221;&gt;&lt;div class=&#8221;container&#8221; role=&#8221;main&#8221;&gt;&lt;div class=&#8221;row&#8221;&gt;&lt;?php do_action( &#8216;__before_article_container&#8217;); ##hook of left sidebar?&gt;&lt;div id=&#8221;content&#8221; class=&#8221;&lt;?ph<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Oz6wv.jpg?s=32&amp;g=1\" \/><br \/>\nShankar Damodaran<br \/>\nphp wordpress woocommerce<br \/>\nI keep getting the error below..Parse error: syntax error, unexpected &#8216;function&#8217; (T_FUNCTION),expecting on line 319for the theme-woocommerce.php file. I have tried using numerous code checkers and none have found a problem on line 319 of the code. This is frustrating as I have not edited the code, rather have copied and pasted a section out and then repasted it into the editor. Having done that, my whole website now does not work. Can someone please help? I read something about Mac computers cha<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/15b96bb27c32fa997301be98e29a9e6f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nStony<br \/>\nphp wordpress parsing syntax-error woocommerce<br \/>\nI am getting the following error once I add an item to my site&#8217;s cart, and try to load the carts page. Parse error: syntax error, unexpected T_DEC in \/home\/puppykis\/public_html\/wp-content\/plugins\/woocommerce\/templates\/cart\/cart.php on line 96I am using WordPress with the WooCommerce plugin. The cart page was working fine, and all of a sudden started acting weird on me.Below is the code. I wasn&#8217;t sure how to add line numbers, but this is last snippet of code from the cart.php file. The last line<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/jU16R.jpg?s=32&amp;g=1\" \/><br \/>\nZaid Iqbal<br \/>\nwordpress performance woocommerce<br \/>\nHow to make my wordpress woocommerce website performance fast. My website is http:\/\/www.furniturehub.pk\/. But it is loading too slow. I have also checked its performance which is 64\/100. So how can i make it more FAST?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cc1bafe36863b24dc87e93d20b4c48ec?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nFrancesca<br \/>\nphp wordpress function woocommerce<br \/>\nI&#8217;m using Woocommerce in WordPress and am trying to add two pieces of code from their documentation to my functions.php fileSee here for the two pieces of code I want to add.I added the first to my file and it worked great. But add the second one and the entire site smashes, I assume because the functions.php file is so vital and there is a syntax error&#8230; but I can&#8217;t spot it, and this documentation comes from their site!This is what I have added:add_filter( &#8216;add_to_cart_text&#8217;, &#8216;woo_custom_cart_<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/07982d6dd5227400863834231aa0e390?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkaiser<br \/>\nwoocommerce<br \/>\nIm trying to get WooCommerce installed correctly so I can do a bulk import of a clients product database into this. Basically when I activate the WooCommerce plugin it causes the page editor javascript to die.I end up with the following JavaScript errorUncaught ReferenceError: switchEditors is not definedIm using the latest version of WooCommerce and the latest version of WordPress &#8211; both downloaded yesterday from the original sites not some other site that it could be damaged from.I&#8217;m also gett<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/ACXdx.jpg?s=32&amp;g=1\" \/><br \/>\nDana Bouchard<br \/>\nwordpress wordpress-plugin shopping-cart woocommerce<br \/>\nUpdated WordPress to newest version and lost our Add to Cart Button. I&#8217;ve been searching everywhere for a solution and tried the ones I have found. We do not have a backup prior to updating unfortunately : \/These are the errors that show in Chrome developer tools browser when on a page with missing button. GET http:\/\/lifefarout.com\/wp-content\/plugins\/woocommerce\/assets\/js\/jquery-cookie\/jquery.cookie.min.js?ver=1.3.1 406 (Not Acceptable) lifefarout.com:51Uncaught TypeError: Object function (e,t){<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8fbe63f77ce3f9656c62b27db4d8583b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohannes Kuhn<br \/>\njquery woocommerce<br \/>\nI am trying to add fly to cart animation to woocommerce plugin, in order to get this I have used the following codejQuery(document).ready(function(e){e(document).on(&#8220;click&#8221;,&#8221;.add_to_cart_button&#8221;,function(){var t=e(this);if(t.is(&#8220;.product_type_simple, .product_type_downloadable, .product_type_virtual&#8221;)){var cart = $(&#8216;.widget_shopping_cart_content&#8217;); var imgtodrag = $(&#8216;.event img&#8217;).eq(0);var imgclone = imgtodrag.clone().offset({top: imgtodrag.offset().top,left: imgtodrag.offset().left}).css({&#8216;opac<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1695579ae694387d9e10f8449880b473?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMavBzh<br \/>\nphp jquery wordpress woocommerce<br \/>\nI use cloudzoom script through the cloudzoom-woocommerce plugin to add a zoom feature on my woocommerce product pages. Everything works fine since it replaces easily the default fancybox script.I&#8217;ve then installed woothumbs, a third party plugin to manage image galleries on product variations. This plugin reload the main image and the thumbs when the user switch variations and then, a JS callback can be set to reinit Cloudzoom.I&#8217;ve made some modifications in the cloudzoom plugin file cloudzoom.p<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/307088804cf3f687dadd2931cf6712b7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRemy Sheppard<br \/>\nphp jquery radio-button woocommerce<br \/>\nI&#8217;m having trouble converting the variation dropdowns into radio buttons a woocommerce enabled site. I&#8217;ve tried the answer found here but I can&#8217;t seem to make this solution work. I&#8217;ve also tried editing the code in the variable.php file.So far the most success is the second approach, editing the variable.php code and changing the tags to tags. The problem is the natural jQuery event isn&#8217;t triggered when the radio buttons are clicked.If any of you know a simpler way to convert the dropdowns to<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>flem php javascript jquery I have a couple form elements that when clicked update the database and disappear.At first, I have a button that reads Check In. Upon clicking it, the database is updated and a dropdown is presented in place of the button. In the dropdown, there are locations for the user to choose, [&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-3572","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3572","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=3572"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3572\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}