Solved

want to open new window on click of menuitem using navigateurl

Posted on 2013-05-22
8
397 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
  • 3
  • 2
  • 2
8 Comments
 
LVL 78

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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 78

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now