i have this website and i want to redirect users to 3 different pages, i have created 2 sign up pages that has a hidden field called role with different values on each of the sign up pages, one being “corporate”..So i used the script below to redirect the user based on the account type he or she c…
Tag: javascript
Can i put an img src inside an array?
Is it possible to put an img src inside an array? I have this project on html/css/javascript and php and so far I’ve created a website where you can buy cars online. Now I want to create a page where …
Color show not properly in the js tree
I have a problem to get the color in the js tree. Below is my coding: This is javascript: My output cannot follow the number to present the color if I’ve added “$testing” variable word in the front of the number.Like below the picture: Actually I want the output like below the picture. The c…
Javascript not triggered
I want to trigger the js function when the class subcat-tab is clicked, but it seems not to be working. I don’t have any error messages but nothing is happening. I’m under a phtml file from Magento 2. …
Change FlexSlider options on mobile in Woocommerce
By default on single product page enabled option ‘controlNav’ = ‘thumbnails’. It’s ok for desktop. But on mobile i want to be ‘controlNav’ = true (dots). I tried to do it with ajax, but I think I need somehow refresh that fragment with flex slides to apply filter. I c…
Why The Select Option Didn’t Showing Number?
i have some problems. Where my stock produk size is “100-199” The Select Option just showing this : If in my product have stock is 1-99 and 200-999 i didn’t get this error. The select option is fine and showing a number. In my case stok s and stok m the select option showing the number. This…
How to access attributes of php object inside a array of php objects from javascript
I have an array of php objects. Inside a javascript function I want to access attributes of an object in the array. If I json_encode the whole array it shows these attributes are undefined. How can I …
call a new PHP page and pass a long text
I have a PHP page(main) and would like to call another PHP page(printpage) on mouse click. I need to pass a large text. I do not want to pass it as a url parameter as it will be too big. I guess I want to pass it as an ajax but I want to open the printpage so I can
Countdown timer until product sale ends on WooCommerce single product page
My goal with this, as I am learning, is to add a countdown timer after the add to cart form on the product page that counts down the time left until the sale is over. I’m using “How TO – JavaScript Countdown Timer” from the w3schools website and I wrote code for getting the _sale_price…
How to escape a double quotes, inside a double quotes, inside a single quotes in PHP/Javascript?
So I have a PHP code that generates a portion of HTML/JavaScript code like below: This works fine, but I want to replace the second parameter “2” with a text. So I have tried: This just gives me an error saying SyntaxError: invalid escape sequence I have many combinations ‘ and ” and o…