I had this problem 2 months ago as well, and yet I haven't been able to solve it.
My webpage has boxes where you can buy virtual money to my website, the pricing works like wonder with JavaScript (If I set 500 points $1, it will calculate all the prices automatically). Now whenever I click "Order", it would write something like this:
file:///C:/Users/MyName/Desktop/MyPage/transaction.html?totalprice=3
so the totalprice is set like this:
<a href="transaction.html?totalprice=6"><img src="" alt=""/></a>
I have tried over 10 different methods to print the "totalprice" to the transaction.html page, but it will not display it and using alert, it will say that it is undefined. What is wrong? Would it matter because I have not hosted the website, as it is in my browser only from a file.
How can I get query string values in JavaScript? I've tried every method from this area and none of them works for me.
You're about to buy 3000 PTS for €
– Timppa Mar 27 '17 at 13:03