Answer the question
In order to leave comments, you need to log in
How to let the user submit the form to the url he needs?
For example, there is a form on a page. It has a field with an url. The user must enter their url. How can I make this form go to the url entered by the user after submitting it (that is, somehow substitute this address in the code of the script that sends the form with Ajax)?
Answer the question
In order to leave comments, you need to log in
If you have already bound the input to the property of the instance, then what prevents you from simply substituting it in the method that handles the dispatch:
const url = `http://toster.ru/${this.userUrl}`;
$.ajax({
url,
// ... все остальное
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question