Input text field to URL String

Hello Everybody,

I am creating a web-hosting site for a client and need some help.

I need to add a form on their website which will send the text inputted into the end of a URL string.

So I will have a input text field on my website with a submit button which says ‘Check Domain’. And lets say the customer types in: ‘abc-company.com’ and submits the form, I want it to take them to:

http://websitehoster.co.uk/login/dac?domain=abc-company.com

So it add whatever is inputted in the text field at the end of this URL: “http://websitehoster.co.uk/login/dac?domain=”.

I have been searching and searching for weeks but I cant find a solution.

Any help would be FANTASTIC!

Have an input field named domain and use GET as method.

Thank You for your help,

Thats works great… Check it on our homepage: websitehoster.co.uk

We used that script on every page of the website…

Thanks again!!

:slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile:

Cool.

I really suggest changing the text colour to not being blue. Its horrible to look at.

Also, add this to the text box

id="textfield" onClick="SelectAll('textfield');"

with this for the javascript

function SelectAll(id) { document.getElementById(id).focus(); document.getElementById(id).select(); }

What this will do is make it so when people click it for the first time " example.co.uk " will be selected for them to type over. This will make the users job easy.

Sponsor our Newsletter | Privacy Policy | Terms of Service