Coding a url linked submit box |
Coding a url linked submit box |
Adrianthelibrarian |
Jun 30 2019, 06:28 PM
Post
#1
|
Group: Members Posts: 2 Joined: 30-June 19 Member No.: 26,920 |
Hi all.
I am trying to find a way to code an html page, that will simply ask the name of a website without the www. and the .com . On hitting submit, it will add the www and .com the go through to that site. So it would simply look like - Enter the title of the site in textbox. You enter "Google". On submit you go direct to www.google.com I am not sure if you have to use some in page script. The more basic, the better. Many thanks for any help. A |
pandy |
Jun 30 2019, 07:39 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Yes, you need to use some kind of programming. JavaScript would do and it's simple enough as long as you only want to cater to one single top level domain.
CODE function reDirect() { var where = document.getElementById('domain').value; window.location.href = 'http://' + where + '.com'; return false; } HTML <form onsubmit="return reDirect()"> <fieldset> <legend>Go to another page</legend> <label for="domain">Type the name of the site:</label> <input type="text" name="domain" id="domain"> <input type="submit"> </fieldset> </form> But in the real world there are many top level domains. How will you know if I want to go to google.com, google.co.uk, google.com.au, google.fr, google.se...? Or what top level domain a site with the domain name rumpelstiltskin uses? |
Adrianthelibrarian |
Jun 30 2019, 09:59 PM
Post
#3
|
Group: Members Posts: 2 Joined: 30-June 19 Member No.: 26,920 |
Thank you so much Pandy, I will try this out straight away. By running the script I hope to find domains that a word is not being used, or the use of a similar named site with a different top level domain. I wanted to find a cheap domain that was had very few letters because my previous one took too long to spell out. A three or four letter domain would be much easier for explaining and when signing up my email
thank you again. I will stay on the forum as i have much to learn A |
Christian J |
Jul 1 2019, 04:16 AM
Post
#4
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
By running the script I hope to find domains that a word is not being used, or the use of a similar named site with a different top level domain. I wanted to find a cheap domain that was had very few letters because my previous one took too long to spell out. Domain registrar companies may have a service like that. |
pandy |
Jul 1 2019, 05:51 AM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Not only may. They do. It's called WHOIS.
https://en.wikipedia.org/wiki/WHOIS Just google WHOIS and you'll find several services. And as said, just about any registrar. But if you are looking for a three letter dot com, I think you'll find that all are taken, even such as qzy. If you find some, buy them all. They are a good investment. |
Lo-Fi Version | Time is now: 26th April 2024 - 04:04 AM |