
$(document).ready(function() {
	$('#checkbtn').click(function() {
	sendValue($('#checkUrl').val());
	});

	$("#checkUrl").keyup(function(event){
	  if(event.keyCode == 13){
		sendValue($('#checkUrl').val());
	  }
	});
	
	
	$('#checklinkbtn').click(function() {
	sendValueLink($('#checkLink').val());
	});

	$("#checkLink").keyup(function(event){
	  if(event.keyCode == 13){
		sendValueLink($('#checkLink').val());
	  }
	});

});

function sendValue(str){
	$('#display').html("checking...");
	$.post("/webedition/20/link_check/link_check.php", { sendToValue: str },
	function(data){

		out = data.returnFromValue;// data returned from url

	    $('#display').html(out);
	}, "json");
}




function sendValueLink(str){
	$('#displayLink').html("checking...");
	$.post("link_check/link_check.php?link_check=1&jsUid="+jsUid, { sendToValue: str },
	function(data){

		out = data.returnFromValue;// data returned from url

	    $('#displayLink').html(out);
	}, "json");
}