javascript

  1. D3x73r

    JavaScript Shopping cart problem -localstorage

    Hello guys, I cant find problem why my javascript isnt working. Problem is I think with localstorage, when I reload webpage content in cart-box should stay there but it only save first content-box that I added to cart, others disappear but their value like $ stay in total amount . And other...
  2. F

    JavaScript Coding starter here: What are your ideas/knowledge/advises to improve my basic Dijkstra Algorithm game !?

    You can already play in browser and its pretty basic but i lack inspiration and knowledge to improve it. To make it more interactive, more fun and interesting. What are your ideas/thoughts? Next step for me is to implement an I/O of the priorty queue and their weights for the User so he inputs...
  3. miabianco

    Node.JS Help with kurento example

    Hello to all noob here!!! I am working an old example of kurento and i am wondering if anyone can help me. First of all this working just fine as is. I make some changes in the code so with the Join button to join the room and with a call button to make a call and with leave button to leave...
  4. JosiahMaybe

    JavaScript Is there any way to prevent Javascript changing things without site permission?

    So I may have worked out a secure way to sell except that in like my site hackers may be able to bypass like my selling logic. I would do custom country check in Javascript using navigator.geolocation, prefill paddle.com checkout with Javascript. paddle.com checkout starts in Javascript and...
  5. I

    How do I display the new comment in the comments section when added and still keep the submission ajax code?

    My code is below: $commentsQuery = "SELECT username, created_at, content FROM comments WHERE post_id ={$row['id']} ORDER BY created_at DESC"; $commentsResult = mysqli_query($con, $commentsQuery); $commentsCount = $commentsResult->num_rows; if ($commentsCount > 0) { echo "<details>...
  6. K

    JavaScript How to add some tags by default

    I want to some tags by default witch show up time of open the page. This code normally working fine as add tags but when I trying some tags default such as java, html, php etc then code normally working but no show up default tags. Below is my code, please advice me how to do const removeTag =...
  7. Akhter

    JavaScript Sum textbox value with Gridview Column of Credit

    i want to sum Textbox(txtamount) value with Gridview Column Credit value,and display in footer. $(function () { CalculateDebitCredittotal() }); function CalculateDebitCredittotal() { var creditTotal = 0; var debitTotal = 0; $("[id*=gvtrans]...
  8. T

    JavaScript Patch Http request is not working

    I've been trying to use the http requests to update a status of a car, so that it will for example go from 'pending' to 'canceled'. I am using patch because I do not want to update all data but only statusId. But what is strange, is that it deletes the car, and I do not get any errors. Why, as...
  9. O

    JavaScript undefined error in setInterval

    Hello, Help please to stop setInterval after ending print ascii image. setInterval(type, 100); - this type my image and it's ok, but i need to stop after complete, in my script it after complete printing it show: undefined I know that i need clearInterval, i try some examples from...
  10. JosiahMaybe

    JavaScript How to send a PHP save request in client side Javascript?

    Good hi, I am trying to just set a variable to a database and like my starting point is Javascript client side where I am trying to find if this works. var xhttp = new XMLHttpRequest(); xhttp.onload = function() { // use this.responseText; } xhttp.open("SET", "likeMyPHP.php?q=MyData")...
  11. JosiahMaybe

    JavaScript Is element.addEventListener universal or do I need jQuery?

    In HTML pages there are elements and these elements can have event listeners. Like most universal way I have found to set these is element.addEventListener with first parameter for what and second parameter listener. Is say like that with "click" universal? Like could it run on all internet...
  12. JosiahMaybe

    JavaScript Should this hide all in all browsers?

    Hello, trying to have a page entirely hidden, but then show specific elements by ID. Would this part work in all browsers? I have tested in Microsoft Edge on a computer. let count = 0; while (count != document.body.children.length) { document.body.children[count].hidden=true; count++; }...
  13. J

    JavaScript Making a web map with leaflet plugin. Why cant I get a text box to display when certain coordinates are clicked?

    Hey, Im trying to make a web map, and I want a box to pop up when a certain spot on the map is clicked. I think my code is fine & when i click the location, i recieve a 'Click event fired!' in the console log. But the box is never displayed. Github link Any help would be great. I just cant...
  14. robisy

    JavaScript New value in google email script

    function sendemail(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheetname = "Sheet1" var sheet = ss.getSheetByName(sheetname); // parameters to get a data range var datafirstrow = 2; var dataColU = 4; // Column D = 4 var dataColTarget = 8; // Column Z = 26 // get the last row var LR =...
  15. JosiahMaybe

    JavaScript How to be sure Javascript is run in a web browser?

    I have heard Javascript may be turned off on some web browsers. I may need like my Javascript run to be able to make a purchase from me. Is there any way I can prevent a purchase without Javascript being run? Maybe an error I could throw or a way to redirect or something? Any way to prevent...
  16. JosiahMaybe

    How to either download core.js or get docs for PrestaShop?

    So I am trying to find either a documentation of PrestaShop Javascript or how to download core.js for PrestaShop to study it. If you find like a full documentation good but if not I could study core.js to find what I like want. PrestaShop is open source and has a GitHub repository, but I do not...
  17. P

    JavaScript Function is undefined after dynamically including <script> to external JS with function

    I have an HTML file that contains a page that, upon clicking a button, should do the following: 1) A <div> panel opens up 2) That <div> panel contains <script src="scripts/record_update.js"></script> 3) The external .js file "record_update.js" contains only one function: officialRecordUpdate()...
  18. yumedoll

    JavaScript [SOLVED] Can anyone help me figure out why these specific EventListeners aren't working?

    I have this: document.documentElement.addEventListener("load", function(){ document.getElementById("loading").style.display = "block"; document.getElementById("okthanks").style.display = "none"; }); window.addEventListener("load", function(){...
  19. C

    JavaScript JavaScript Hiding All Images On Page But I Need One Always Visible

    Hi! I have this page which displays different shield colors, depending on which TEXT is clicked (Bronze, Silver, Gold, Pro or Legend). By default, the BRONZE shield image is showing along with the country flag image: Then when you click on Silver, Gold, Pro or Legend, the corresponding...
  20. Hilton D

    Answered Converting String to Number in JavaScript: Need Clarification and Code Example

    I'm trying to convert a string to a number in JavaScript, but I'm encountering some unexpected results. While I've used functions like parseInt() and parseFloat(), I'm still confused about the behavior in certain cases. Could someone clarify the process of converting a string to a number and...
Top Bottom