Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  How to change main menu link to open URL in NEW window instead of same
Previous Previous
 
Next Next
New Post 2/5/2006 12:28 PM
User is offline Dan Acton
7 posts
10th Ranked


How to change main menu link to open URL in NEW window instead of same 

Hi,

I need to change the my page settings so that when the user clicks on a certain menu item - he is taken to the URL - but in a new browser window.

I checked the radiobutton in the advanced page settings under "Link Type" and inserted the URL and it does navigate to the specified URL, but it stays in the same window.  Can someone tell me what code I need to change to get  the specified URL to open a _blank target (new window)?

Thanks ahead,

Dan

 
New Post 2/6/2006 6:58 AM
User is offline Chevol Davis
22 posts
www.thornburgmortgage.com
10th Ranked


Re: How to change main menu link to open URL in NEW window instead of same 

What version of DNN are you using? I have done it in 3.2.1, use this in the location of the URL:

window.location.reload(); window.open("http://www.yourlinkhere.com")

This will get it to do what you want. You need to do the javascript reload because the page sees the link click event and thinks it is opening it up in the current window. The reload will keep the window displaying what it originally had and the open just opens the URL in a new window.


What would life be if we had no courage to attempt anything? --Vincent Van Gogh
 
New Post 2/7/2006 3:03 PM
User is offline Dan Acton
7 posts
10th Ranked


Re: How to change main menu link to open URL in NEW window instead of same 

Hi chevoldavis,

I'm using version 3.1.1.  I tried inserting your snippet into where I would normally insert the link in the page that I wish to have open in a new window: 

More precisely, I went to page settings, chose advanced settings, and clicked the radiobutton for a URL.  I then inserted window.location.reload(); window.open("http://www.yourlinkhere.com")

It did not work.  All I get is a dead link and a javascript error for the page.

 

Maybe I'm supposed to be inserting this code into the page I want to popup - so I tried that too. and got some kind of infinite loop going (error). 

Since I'm pretty new at this - maybe you could clarify exactly where I'm supposed to insert this code.

Thanks,

Dan

 

 
New Post 2/7/2006 8:46 PM
User is offline Chevol Davis
22 posts
www.thornburgmortgage.com
10th Ranked


Re: How to change main menu link to open URL in NEW window instead of same 

That could be the problem... you are using 3.1.1 I believe all you need to do is:

 

under advanced settings -> other settings -> link URL

type in the url you want and add "target=_blank or "target='_blank'  that should take care of it.

The textbox for your URL should look like this:
http://www.yourlinkhere.com"target=_blank
or
http://www.yourlinkhere.com"target='_blank'

The quotation before the word "target" is to end the opening quotation that is doing the actual call for the URL variable in the code, so just link any <a href=... link we can add target=_blank to force it to open in a new window. Let me know if this works for you.


What would life be if we had no courage to attempt anything? --Vincent Van Gogh
 
New Post 2/8/2006 12:17 PM
User is offline Shad Pulley
5 posts
10th Ranked


Re: How to change main menu link to open URL in NEW window instead of same 
Modified By Shad Pulley  on 2/8/2006 9:37:34 PM)
The javascript should work.  You just have to put *  in front of the window.location.reload(); window.open("http://www.yourlinkhere.com") so it looks like this:

* window.location.reload(); window.open("http://www.yourlinkhere.com")
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  How to change main menu link to open URL in NEW window instead of same
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


ZLDNN.COM
We provide commercial DotNetNuke modules.
www.zldnn.com
DNNhost Scandinavia
SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
DNNhost.dk
Personify Design, Inc.
Seattle-based Personify Design has developed customized DotNetNuke websites for a wide range of customers to meet many different types of needs, including distributed authorship across thousands of pages to integrated Verisign e-commerce capabilities.
www.personifydesign.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP