ben0ist:
Hi, I added a link to another site in my menu. In order to get it opening in a new tab I changed:
window.location.href=this.href; by window.open( this.href, ‘_blank’);
in the main.js file. (also added no ajax + ticked open in a new tab)
It’s now opening in a new window, but an error message appears on the main site: “Perhaps the network unstable, please click refresh page.” Do you know how to avoid this error? Thx
Hi, assuming you want the menu item click forward to ‘http://google.com’, open travel/js/main.js and find this line:
`if(jQuery(this).attr(“act”) == “noajax”) {
window.location.href=this.href;
}`
update it with:
if(jQuery(this).attr('href') =='http://google.com'){
window.open( jQuery(this).attr('href'), '_blank');return false;
}
if(jQuery(this).attr("act") == "noajax") {
window.location.href=this.href;
}
Best