JavaScript - jQuery - Ajax

  1. » Marius
    What's an efficient way of implementing the dotProduct method (to get the Dot product of two arrays) without importing any new Javascript libraries?...
    Last post » Admin
    Here is a method.
    Use the map() function to create a new array with multiplied results of each index and the reduce() function to sum the values of...

  2. » Marius
    I'm trying to push an array into the same array in javascript, But it doesn't seem to be working; the third element is added continuously.
    Here is...
    Last post » Admin
    You are trying to push the same reference to the array. So, when the array updated later, the array inside the element will be updated as well.

  3. » Marius
    I have an array of objects, and for plotting a graph I need to split it into 3 different arrays. How to do it using JS?

    const dataOverview = ;

    Last post » Admin
    It is very simple, you just use the map() function.

    var series1 = => x.series1);
    var series2 = =>...

  4. » Marius
    Why the behaves differently with and without ' this ', in JavaScript?
    The result with 'this' in is same when 'this' is...
    Last post » Admin
    The call() function require the first parameter as 'this' object, if you do not need it, just pass null ., ...args);

    In your...

  5. » Marius
    I have the following problem:
    1. eliminate thousand separators(,) 5,555 to 5555.
    2. if the user inputs 55,66 replace , with . and get the value...
    Last post » Admin
    Try the function from the following code:

    function salNr(s){
    //If there is comma before the last two digit, replace it with dot, else remove...

  6. » Marius
    I have this code (ajax is async):

    function echoHello(){
    return $.ajax({
    //this will return hello ;

    function echoWorld(){
    return world...
    Last post » Admin
    Ajax makes a call to the web server and is asynchronous. You don't know how long it will take. It is the same as:

    setTimeout(_ => {...

  7. » Marius
    I have a question: i want to change keys into a JavaScript object if their value is number, for example, I have the following object:

    Last post » Admin
    To change a key into a JavaScript object, you need to clone the value with the new key, and then you delete the old key in the object.


  8. » Marius
    I can't figure out how I can change the following object in JavaScript:

    { first : , second : , third : }


    { de : , ab : }

    I want to...
    Last post » Admin
    You have to loop the array and for each item in the array check if an array for that value exists in the accumulator or not before adding it:...

  9. » Marius
    I have the following html and JavaScript code. An input text box and a button.

    <input type='text' id='backwards-input'>
    Last post » Admin
    Try use and study the following code:

    <input type='text' id='backwards-input'>
    <button id='backwards-button'>Button</button>...

  10. » Marius
    I have 3 arrays of objects in JavaScript:

    const fruits =

    const car =

    const books =

    One temporary array where I will store random objects...
    Last post » Admin
    You need to get two random numbers:
    - the first to decide which group to pick,
    - the second to pick an item from that.

    We generate a random...

  11. » JanMolendijk
    Hello Coursesweb I`m unknown with javascripts ????

    I would like to add function minutes to this script
    on each minute an diferent text added to...
    Last post » Admin
    Try the following script.

    <div id='addtxtmin' style='color:#00d; font-size:20px; font-weight:700'></div>

  12. » JanMolendijk
    Hello Coursesweb I do not known mutch about javascipts
    & for view hours I gambling to try to get images in this javascript

    I try with...
    Last post » JanMolendijk
    You had the best support on the internet,
    mutch better then stackoverflow.

    i learnt alot from you it was really valuable
    + Thanks for all you...

  13. » PloMar
    I have this JS script:
    function blockToggle(type,blockee,elem){
    var conf = confirm( Press OK to confirm the ' +type+ ' action );...
    Last post » warrenfelsh
    In JavaScript almost everything is an object, null and undefined are exception. When you try to access an undefined variable it always returns...

  14. » JanMolendijk
    Hello Coursesweb I`m buisy to setup an darkmode for my website
    But when I wanna use an hyperlink to another page I would like
    to set automatic the...
    Last post » JanMolendijk
    I thought about this meight you can make a rubric
    for scripts + tips from others meight it is usefull

    Sometimes I surf for something specifiek...

  15. » JanMolendijk
    Good evening (dutch-time) I have a javascript what can copy text to a clip-board + it has a button to show the item-list in a alert-box.

    But can`t...
    Last post » JanMolendijk
    Thanks for the support I tried already things with history + f_print
    also studied those a little before I asked coursesweb but I shall
    when my head...

  16. » JanMolendijk
    Happy New Year Chief.... My first two weeks I spended on bed due to illness

    I wanna use a script but it does not delete the item from my sql...
    Last post » JanMolendijk
    O God that I did not see this `stupido me`....

    Thank you very much for all the support `its working now`

  17. » JanMolendijk
    Last time you learnt me how to add an id from url to a javascript
    but by this script it is not working what do I do wrong ????

    Last post » Admin
    Maybe there is some mistake in other part of your script.
    Check to see if there is any js error in browser console, F12.
    What value it shows in...

  18. » Marius
    I'm trying to do this:
    - But instead, to search with multiple search words in two columns of the same...
    Last post » Admin
    Split the search string by space and filter the column for each word. Try this code in your JS script:

    function myFunction() {
    var src, input,...

  19. » JanMolendijk
    I`m almost their with my tag-system

    But my second question for today: I can`t find-out how to detect the names from this javascript.
    I can detect...
    Last post » Admin
    Yes, in that function.
    Then, see in browser console (F12) what data is displayed.

  20. » Admin
    The delPartUrl() function from the following JavaScript code can be used to delete part of query string from page url in browser, without affecting...

  21. » JanMolendijk
    I still don`t understand how I can get the results from a div into a text input form field ?

    <div id= div2 > Content </div>

    Last post » JanMolendijk
    Thanks Chief for all your support....
    My URL-extractor is working
    in the comment-system

  22. » JanMolendijk
    For day`s i`m busy to improve my comment system
    & no I`m ready to place a url extractor but I hope
    you can support me by this-one....

    I want...
    Last post » MarPlo
    It depends where you want to add the html content from javascript in the form, on the beginning, or at the end after other elements.
    Se the: 2....

  23. » JanMolendijk
    Sorry but I have something with the Vex-modal from:
    I get on Edge browser a complete height...
    Last post » JanMolendijk
    Thanks for the support I changed my website to something more simple
    so my home-server XAMPP can run better, my complex pages are not running well....

  24. » JanMolendijk
    Dear admin, I`m searching for round 10 hours for a solution to track & store spending-time from a visitor on the website.

    I found a Ajax...
    Last post » Admin
    Maybe it is not working with onunload to execute ajax request when the user closes the page.
    Try the following code.

    - JavaScript:...

  25. » JanMolendijk
    Dear admin I try to add two buttons in one off your scripts for opening via button
    but i cant find out what i`m doing wrong one is opening but...
    Last post » Admin
    There is no attribute id_1 . You can change the value of an atribute, but not its name.
    You can use the same js script for multiple buttons;...