I used wixlocation.to in javascript code so that when the visitor clicks on a button, it takes them to an url based on the visitors input.

Good idea.