E
E
Evgeny Romashkan2018-12-10 13:04:46
JavaScript
Evgeny Romashkan, 2018-12-10 13:04:46

Link to a page with completed form fields?

Good afternoon!
There is a form for search with a heap of fields. On submit, an ajax request is made to the server for data.
It is necessary to implement the ability to create a link to this page so that the person who clicks on the link sees the same search results and the form filled out in the same way. It seems to me that the most logical option is to use JS to prescribe the filled fields as parameters in the URL.
Maybe there are some ready-made solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Romashkan, 2018-12-10
@EvgeniiR

UPD from the author of the question:
I solved the problem like this:
By clicking on the button, all form parameters are taken and shoved into the url in the form of a GET request, the server can now accept both GET and POST parameters. Thus, the URl can be easily copied and navigated from another machine.
When you click on the link, the form is validated on the server, and the client is given an HTML-ka with an already filled form.

D
Denis I., 2018-12-10
@dplsoft

I don't think you're asking the right question.
and second, what technologies do you have?
and what kind of ajax are you doing (redirecting to a new page or what kind of rest-request analog that gives you json)? (I suspect that the first one)
further - do you need to implement a link, or that the form containing the search results contains a search form filled with search parameters?
if the latter, then generate the html parts on the server directly from the search query parameters.
ready solutions? I'm sorry, but with your level of understanding of technology, it's better for you not to go into "ready-made solutions" for the time being, because you won't figure it out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question