I need to redirect to a specific hostname from the request by adding "https://" in front of it.
<a target="_blank" href="javascript:createDynamicPubUrl();" >
Here is the function that generates the URL by combining the hostname with the protocol (https):
function createDynamicPubUrl() {
publisherHostName = document.getElementById('hostname').value;
var pubUrl ;
var protocol = 'https://';
pubUrl = protocol+publisherHostName;
return pubUrl;
}
Instead of actually redirecting to pubUrl
, it is displaying the pubUrl
on the webpage.