Answer the question
In order to leave comments, you need to log in
How to pass data to JS script via link?
There is a calculator type form in JS on the page, which, in response to a user request, provides a specific list of data.
For example, a person enters the color "green" into the field, the shape "square" into the field, and as a result, he gets below the calculation of all the green and square that is in the database.
And if you need to send the user to this layout, then you need to give him a link that will fill in the "color"-green and "shape"-square fields for him and click the "find" button.
In short, you need to create a link to the page, on which there will already be a layout of everything green and square.
How to do it?
Answer the question
In order to leave comments, you need to log in
you can pass the parameters to the hash in the url, exmple.com#color=green, and then parse and set the value in js.
1. Use $_GET in php
2. Parse url stackoverflow.com/questions/979975/how-to-get-the-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question