Solved

want to open new window on click of menuitem using navigateurl

Posted on 2013-05-22
8
410 Views
Last Modified: 2013-06-05
Hi,

I need to open a new window on click of a menu item and its using navigateurl as mentioned below.

I tried this it opens a new new tab instead of a new window, I just want a new window and current page need not to be updated, what other things i can do.

  protected void navMenu_MenuItemDataBound(object sender, MenuEventArgs e)
    {

        //webhelp changes
        if (e.Item.NavigateUrl.Contains("PageURL=MenuWebHelp"))
        {
            string PopupWindowScript = @"javascript:window.open('/Medicare/Medicare/Help/Help.aspx?PageURL=', 'HelpDocs', 'top=50,left=50,width=800,height=800,location=no, status=no, menubar=no, scrollbars=no, resizable=yes,').focus();";
           e.Item.NavigateUrl = PopupWindowScript;
                       e.Item.Target = "_blank";
           
           
        }

        if (e.Item.NavigateUrl.Contains("#"))
        {
            e.Item.NavigateUrl = "";
        }
    }
0
Comment
Question by:dotnetcode
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
8 Comments
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 250 total points
ID: 39189749
Very dependant upon the browser settings.. i have open all popups in a new tab and it works very well .
0
 

Author Comment

by:dotnetcode
ID: 39190935
whatever the settings browser has, the new page should display in new window rather than new tab, what can i do this to make it default and compulsory behaviour
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 250 total points
ID: 39191386
You cannot compel anything if the user has decided they do not want popups it is their right to do so. They own the browser, not you.  If you want to display another page then you might want to use an iframe

Cd&
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dotnetcode
ID: 39218009
I found the solution after some quick research. Thanks for your inputs on this.
0
 

Author Comment

by:dotnetcode
ID: 39219413
I've requested that this question be closed as follows:

Accepted answer: 0 points for dotnetcode's comment #a39218009

for the following reason:

I found the solution after some quick research. Thanks for your inputs on this.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39219414
Conventionally, when a member finds their own solution, they post it.  Otherwise the question is just a bit of empty trash in the database that is no help for anyone finding it in a search.

Cd&
0
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 39221105
the only way it is of help is if the solution is also given to the rest of the community.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question