I need to create a textbox on my page where they type in any text and it redirects them to a subdomain with that same text.
For example...In the textbox, they type 'bgates' and then it redirects them to http://bgates.maindomain.com . I don't want to have to hardcode each subdomain into a form, I need the script to just tack it on to xxxx.maindomain.com automatically.
Java maybe? Any help is appreciated!Coding question...java maybe...?
You could use Javascript. In the example below, submitting ';answers'; would take you to answers.yahoo.com';.
%26lt;html%26gt;
聽聽%26lt;input type=';text'; onchange=
聽聽聽聽';window.location='http://' + this.value+'.yahoo.com'';%26gt;
聽聽%26lt;input type=';submit'; value=';Redirect';%26gt;
%26lt;/html%26gt;Coding question...java maybe...?
You can try Servlets - Doget() or Dopost() for placing the value of the Text box in the Servlets methods and calling the same which redirects to your link.
No comments:
Post a Comment