JavaScript Problem: Passing a JavaScript Value Between HTML Pages




In this tutorial we are going to look at passing a value from one HTML page to another. We will use two techniques: localstorage and the query string. The value we are going to pass is the number of milliseconds so that we can determine elapsed time.

For more resources on JavaScript:
http://www.allthingsjavascript.com

Access to EVERY course (get 2 months free): https://www.skillshare.com/r/profile/Steven-Hancock/24508

Courses offered on Udemy at a discount (access from my site): http://allthingsjavascript.com/courses.html

Tutorials referred to in this video:
local storage: https://youtu.be/CsoknB_0TW8
indexedDB: https://youtu.be/g4U5WRzHitM
coersion: https://youtu.be/z4-8wMSPJyI
Formatting Time with Date object: https://youtu.be/j8katkbMVhs
Tracking Elapsed Time: https://youtu.be/knbUg0Q3qLU
Determining Days Between Dates: https://youtu.be/uWQEGgNvac0

#javascript #AllThingsJavaScriptLLC

Original source


13 responses to “JavaScript Problem: Passing a JavaScript Value Between HTML Pages”

  1. Hello sir, Awesome tutorial ๐Ÿ™‚ I have a doubt
    @10:31 in line 12 instead of function(){init();} i did init() directly and it is not working and what s the difference between the two.

    I am pretty new to js i started just today so I don't understand the difference

  2. I'm having trouble getting the technique to work. I want once the script is executed for the other page to be permanently edited, is there a way to do that with this technique or is that not possible?

  3. Good video but i have any question. We can't change the value propertye from a html element? For example: var htmlElement = document.getElementById("idElement"); htmlElement.value = "someValue";
    It didn't work for me as it did work before.

Leave a Reply