I need to put together a form script to redirect the user based on what is entered into the form. I understand this can be done from JavaScript, I managed to put something together but it didn’t do quite what I wanted it to do which is
User enters text, for example mysubdomain, then hits submit.
I would then like them to be forwarded to mysubdomain.mydomain.com.
I managed to do the opposite so it directed to mydomain.com/mysubdomain.
Do you mean
using same domain as you are on (details about the location object here at MDN): and assuming the form is on xxxx.mydomain.com