Link to home
Start Free TrialLog in
Avatar of amit kumar
amit kumar

asked on

how to check domain name availability in javascript using jsp.

how to check domain name availability in javascript using jsp
Avatar of leakim971
leakim971
Flag of Guadeloupe image

You need a service like site one : https://whoapi.com/documentation/api/domain-availability
You have code ready to use here from their page : https://whoapi.com/documentation/code_examples#code-example-view

Another one using jQuery :

<script>
  jQuery(function() {
  	$("#check").click(function() {
  		var site = $("#site").val();
  		$.getJSON("//api.whoapi.com/?domain=" + site + "&r=taken&apikey=YOURKEY", function(output) {
  			var status = output.taken * 1 ?"not available":"available";
  			$("#result").val(status);
  		});
  	});
             
  });
</script>
</head>
<body>
<input type="text" placeholder="site to check" id="site" /><input type="button" id="check" value="check" />
<br/>
<input type="text" id="result" />

Open in new window

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.