I am trying to redirect to a hostname which is coming as part of request after appending https:// to this.
<a target="_blank" href="javascript:createDynamicPubUrl();" >
Below is the function to create a url by appending hostname with protocol(https) :
function createDynamicPubUrl() {
publisherHostName = document.getElementById('hostname').value;
var pubUrl ;
var protocol = 'https://';
pubUrl = protocol+publisherHostName;
return pubUrl;
}
Instead of redirecting to pubUrl it is printing the pubUrl on the webpage.