Design and CSS styles
Version 4.x > Design and CSS styles > How can I make the link opened in the new window? View modes: 
User avatar
Member
Member
jane-thechinabusinessnetwork - 10/26/2009 2:50:37 PM
   
How can I make the link opened in the new window?
Hi there,
I know that this maybe a weird question.
In our website, we have a unique link which links to other webpage.
In the CMS Desk, I added a blog item under the page if I want to add a new link on our website.
Now when we click the link, it will open in the same window.
We want to make the link opened in a new window.
I tried to revised the menu action- "Javascript command" in the properties of the blog item, and also the webpage. But it's not working.

I would like to know if it is possible to change the action in CMS Desk.

Thanks.

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 10/28/2009 5:16:42 PM
   
RE:How can I make the link opened in the new window?
Hello,

Whether is you link within Editable region, you can use insert/edit link button and set your URL with target: New window (_blank) in the Web tab.

However if your link is supposed to be within some menu, you can put following javascript command to the 'CMS Desk -> Content -> Document -> Properties tab -> Menu -> javascript command':

window.open('http://google.com','mywindow','width=400,height=200')

It will open new window with specified link.

I know you said it doesn't work, therefore would it be possible what are symptoms of that behavior?

Best regards
Ondrej Vasil

User avatar
Member
Member
neelima.vidyarthy-mcxess - 8/10/2010 9:58:14 AM
   
RE:How can I make the link opened in the new window?
yes it works but only on google chrome.

it gives Invalid Argument error on page, When I am using Internet explorer.
here i am giving my Javascript command :

window.open('http://192.168.4.23/WebMessengerCandC/Begin.aspx','MCXess Chat','width=430,height=500');

how to solve this problem, please help.
Thanks in advance.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/10/2010 4:07:03 PM
   
RE:How can I make the link opened in the new window?
Hi,

Could you please something like this:

window.open('http://www..google.com');return false;

I hope it will help.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Pete - 11/14/2013 9:32:14 AM
   
RE:How can I make the link opened in the new window?
I was looking for something exactly like this but using its own URL without user having to type it manually.

This did the trick:

window.open(this.href);return false;

Client wanted to have PDF (or any other file type) displayed in navigation menu and opened in new window.

Regards