skip to Main Content

How do I combine javascript variables into a object – Jquery ajax

I need to combine all variables in one object: $.get("https://www.virginmegastore.ae/en/gaming/playstation/playstation-games/sonic-forces---ps4/p/714792", function (data) { var productNamePost=$("[name='productNamePost']").val(); var productCodePost=$("[name='productCodePost']").val(); var bg = $('.pdp_image-carousel-image.js-zoomImage-mobile').css('background-image'); var productPrice=$(".price__container > .price__value > .price__number").text(); var url = window.location.href; console.log(url); }); Sorry the question was unclear,i was need…

VIEW QUESTION

Stop timer JavaScript – Woocommerce

I am trying to stop timer if div error div shows on page. Here is the code. I am not sure why clearTimeOut is not stopping timer. <script type="text/javascript"> function timeOutRedirect(){ var delay = 60000; // time in milliseconds //…

VIEW QUESTION

Checking file size limit – Jquery ajax

i need help in checking file size before uploading file, i want to check the size of file and then continue to upload $("form#data").submit(function(e) { e.preventDefault(); if(this.files[0].size > 2097152){ alert("File is too big!"); this.value = ""; return false; }; var…

VIEW QUESTION

how to filter json data for different key value and creating a new json element using that key values without hard coding data – Jquery ajax

<table> <tr> <th>Net Weight</th> <th>Net Weight Count</th> <th>Difference Average</th> </tr> <tr> <td>5</td> <td>20</td> <td>120</td> </tr> <tr> <td>3</td> <td>3</td> <td>30</td> </tr> <tr> <td>52</td> <td>1</td> <td>123</td> </tr> </table> I have a json data in which i want to filter these data according…

VIEW QUESTION
Back To Top
Search