-
All replies
-
Helpful answers
-
Oct 7, 2015 5:49 AM in response to yellinasby yellinas,Code used in jsp:
<li class="gallery">Gallery</li>
Code used in external js:
$('.gallery').on('click', function() {
if (!window.location.origin) {
window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
}
var newUrl = window.location.origin;
window.open(newUrl+'/gallery');
return false;
});
Help Needed: Please Let me know if there is an alternative solution.
My requirement is to open the base url appended with gallery in a new tab.