Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Open URL Redirection in new Window/Tab View modes: 
User avatar
Member
Member
robert-tailor.co - 11/8/2012 2:22:13 PM
   
Open URL Redirection in new Window/Tab
Hi,

For pages in the CMS, there is an option to redirect to a URL ('Properties' -> 'Menu' -> 'Menu Actions').

If I set 'URL Redirection' to an external URL, how can I control whether it opens that link in the same window or a new window?

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/8/2012 10:33:30 PM
   
RE:Open URL Redirection in new Window/Tab
Hi,

you can use the javascript option as discussed in this forum thread.

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

Best regards,
Juraj Ondrus

User avatar
Member
Member
kelly.cofer-medxcelglobal - 2/6/2013 10:40:55 AM
   
RE:Open URL Redirection in new Window/Tab
But, what if javascript is disabled on a person's machine?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/7/2013 3:47:17 AM
   
RE:Open URL Redirection in new Window/Tab
Hi,

And what if popup windows are disabled? These are things we cannot influence and it is the clients choice. You will need to implement it in other way - e.g. using custom web part and do the redirection in the server side code.

Best regards,
Juraj Ondrus

User avatar
Member
Member
robert-tailor.co - 2/7/2013 2:26:47 PM
   
RE:Open URL Redirection in new Window/Tab
kentico_jurajo wrote: And what if popup windows are disabled? These are things we cannot influence and it is the clients choice. You will need to implement it in other way - e.g. using custom web part and do the redirection in the server side code.

Did you mean using the ASP.NET Response.Redirect() command in the web part code behind? If so, you can't control whether a URL opens in a new page with Response.Redirect() either.

Just to clarify, I ended up using a hard coded <a href> tag to the URL I wanted with a target attribute set to open a new window as a Javascript solution was too unreliable. As you say, there are too many different user configurations that can prevent it from working, so hard coding was the only solution.



User avatar
Member
Member
dbraun-pediatricweb - 2/21/2013 12:41:21 PM
   
RE:Open URL Redirection in new Window/Tab
I am attempting to redirect to a new page from a page that appears within an iframe and this code does not work. Do you have other suggestions?

I have tried this in the Javascript commmand:
window.parent.location.href = "http://www.mig.com/Documents/MS-Computer-Data-Source";

But the resulting page still appears within the inframe. I want to to be a DIFFERENT page OUTSIDE of the iframe

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/21/2013 8:55:51 PM
   
RE:Open URL Redirection in new Window/Tab
Hi,

I am little bit confused - how this applies to the URL redirection setting? If I am right, you have some link in the iFrame and you want to open it in a new window? Is the target property set for the link?

Best regards,
Juraj Ondrus

User avatar
Member
Member
dbraun-pediatricweb - 2/22/2013 8:43:53 AM
   
RE:Open URL Redirection in new Window/Tab
OK... please see this dev site
https://www.migint.com:4444/ResourceLibrary/Case-Studies/CDS.aspx

The form is in an iframe.
When you fill out the form and click submit, the form goes to a thank you that then redirects to a white paper. The problem is the white paper is loading directly in the iframe, not as a separate parent.


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/26/2013 10:57:34 AM
   
RE:Open URL Redirection in new Window/Tab
Hi,

The form does not work in Firefox.

Anyway, I am still not sure how is this related to Kentico. How is the link to the white paper created? Have you tried adding a custom javascript to the link?

Best regards,
Juraj Ondrus