Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

want to open new window on click of menuitem using navigateurl

Posted on 2013-05-22
8
Medium Priority
?
415 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 83

Accepted Solution

by:
David Johnson, CD, MVP earned 1000 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 1000 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
Industry Leaders: 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 83

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

704 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