I am writing a few lines of code for a form that takes the input from the user and uses it to go to a subdomain of my URL (because each user has their own subdomain). I need to iframe this into another page, so I need the result to open in a new window. For some reason I am having a lot of trouble with this. Here is my code:
I replace my actual URL with 'myurl' for the purpose of this post.
Any suggestions?
Thanks
Code:
<form onsubmit="window.location='http://'+this.subdomain.value+'.myurl.com/'; return false" target="_blank"> <input type="text" name="subdomain"/> <input type="submit" value="Continue"> </form>
Any suggestions?
Thanks
Comment