Load page in popup window with different (from parent page) browser

Hi,
Environment: Windows XP or Windows 7, Visual Studio 2010, Internet Explorer 8 (IE)
I have an application which opens page containing HTML editor.  Here you can edit a document (pooled from db). Next, btnPreview opens a new popup window and shows changes you made via Internet Explorer (IE - default browser).
Here is original code - works OK when you run from both - VS 2010 (http://localhost:50827/NCSite/MenuEditor.aspx) or via browser IE (http://localhost/NCSite/MenuEditor.aspx).
Please pay attention - with VS2010 was used a dynamic address (localhost:50827) created by VS2010
Here is a code I used for that:
URL = Request.Url.Scheme +
"://" + Request.Url.Host + appPath + URL;
ClientScriptManager cs = Page.ClientScript;
cs.RegisterStartupScript(this.GetType(),
"NewWindow",
"<script>window.open('" + URL +
"', 'New')</script>");
Now I have a request to add two more buttons to preview in Google Chrome (GC) and Mozilla Firefox (FF).
I used next code:
using System.Diagnostics;
//for btnIE:
URL = Request.Url.Scheme +
"://" + Request.Url.Host + appPath + URL;
Process.Start("iexplore",
URL);
//for btnGC:
URL = Request.Url.Scheme +
"://" + Request.Url.Host + appPath + URL; 
Process.Start("chrome",
URL);
//for btnFF:
URL = Request.Url.Scheme +
"://" + Request.Url.Host + appPath + URL; 
Process.Start("firefox",
URL);
It works OK when you run from VS2010 (http://localhost:50827/NCSite/MenuEditor.aspx)
but when you open application via default browser (IE) and after editing document press btnIE, btnGC, or btnFF it is not creating a new popup window and simply replacing existing window
and shows updated document via IE.  Processes for GC and FF not even started (looked through Task Manager).
Is it any way to solve that issue?
Thanks,
Dm
dmirkin

Hi dmirkin,
If Andy's suggestion still cann't resovle your issue.
You are more likely to get more efficient responses to
ASP.NET issues at http://forums.asp.net where you can contact ASP.NET
JavaScript experts. This forum is for web application.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How do I populate a popup window with data from the parent window

    I am brand new to JSF so please help me. I have a JSF page where users enter some search criteria and it displays the results in a matrix table. I need to have a PRINT button or link on this page that pops up a new window that displays the same data but in a printer-friendly format.
    The parent page is already created and works fine. Now, what is the best way to populate the same data in the popup? The data is stored in a hashmap and retrived by a managed bean with session scope. Below is the XHTML code for displaying the table in the parent page.
    <tbody>
                             <c:forEach items="#{inventoryManagedBean.inventoryColors}" var="row">
                                  <tr id="matrixColor">
                                       <c:forEach items="#{inventoryManagedBean.sizeList}" var="column" varStatus="cellStatus">
                                            <c:if test="#{cellStatus.index == 0}">
                                                 <th width="70px"><h:graphicImage value="../graphics/styles/#{row.color}.jpg"
                                                      alt="#{row.color}" width="70" height="40"></h:graphicImage></th>
                                                 <th width="100px"><h:outputText value="#{row.colorDescription}" />
                                                 <h:outputText value="#{row.color}" /></th>
                                            </c:if>
                                            <td width="70px"><c:if
                                                 test="#{inventoryManagedBean.inventoryMap[row.color][column.size] != null}">
                                                 <c:if test="#{inventoryManagedBean.inventoryMap[row.color][column.size].label != '-1'}">
                                                      <span class="matrixText"><h:outputText
                                                           value="#{inventoryManagedBean.inventoryMap[row.color][column.size].label}"
                                                           title="#{inventoryManagedBean.inventoryMap[row.color][column.size].title}" /> </span>
                                                      <t:htmlTag value="br" rendered="#{userManageBean.user.loggedIn}" />
                                                      <a4j:region renderRegionOnly="false">
                                                           <h:inputText
                                                                value="#{inventoryManagedBean.inventoryMap[row.color][column.size].quantityOrdered}"
                                                                rendered="#{userManageBean.user.loggedIn}" maxlength="6" size="6">
                                                           </h:inputText>
                                                      </a4j:region>
                                                 </c:if>
                                                 <h:outputText value="Call"
                                                      rendered="#{inventoryManagedBean.inventoryMap[row.color][column.size].label == '-1'}" />
                                            </c:if> <h:outputText value="N/A"
                                                 rendered="#{inventoryManagedBean.inventoryMap[row.color][column.size] == null}" /></td>
                                       </c:forEach>
                                  </tr>
                             </c:forEach>

    call javascript window.open("pagename"); & add some printer button there,
    and put rendered attribute to button & in backing bean generate boolean getter setter for variable use same variable in jsp printer button in rendered attribute, in bean constructor pass some parameter throuh jsp page,
    if parameter is match then it rendered attribute to true for button else not,
    it means that in parent window you can not see printer button, but in same window in popup you will see printer button,
    good luck
    <h:commandButton rendered="#{bean.renderedButton}"/>
    bean
    private boolean renderedButton= false;(generate getter setter)
    also pass parameter from UI to bean constructor

  • Popup Window with coordinates from Browser

    Hi
    I have a problem with the popup window display.
    My requirement is:
    I have a flex application ,with height=200,width=200, which
    is occupying small amount of the browser window space.
    In the application, when i click on a button a new popup
    window is to be created with height=700 and width=700.
    I created the samething.
    But the problem is, the popup is displaying(overlaying)
    within the flex application area, where the full screen of the
    popup window will not be shown. bcoz the flex application is having
    only 200 Height & 200 Width.
    I want to have something like the popup window should be
    displayed with browser coordinates and overlayed on the browser
    window.
    Can anybody suggest me how to get this...
    I appreciate the help.
    thanks
    KVS

    You would have to open a new browser window by hitting
    another html page with a different SWF file in the html. I think
    that would be the easiest way.

  • Passing data from calling page to popup window

    Hi All,
    We are developing a BSP application for business card.I need to provide a preview button .
    when the user clicks this button a
    poopup window should open with the preview of business card.
    My problem is how to pass the values like name , designation etc from the main page to popup window.
    The code for previre image:
    <h t m l b : i m a g e   s r c = " s _ b _ d e  tl . g i f  " a l t = " P r e v i e w   C a r d "  o n C l i c k="addr" on C l i e n t C l i c k = " c a l l W i n d o w ( ) ; "/>
    <s c r i p  t t y p e = " t e x t / j a v a s c r i p t ">
    f u n c t i o n  c a l l W i n d o w ()
    w i n d o w .o p e n ( " p r e v i e w . h t m " ) ;
    </s c r i p t >
    preview.htm is a simple HTML page . i need to pass values from main page to this page.
    OR
    Is it possibel to restrict the size of a VIEW to use it as a popup window?
    OR
    is there any other way to achieve this like.. the <bsp:call comp_id=" " />
    tag , but i have no idea how to use it.
    Thanks,
    Anubhav.
    Edited by: Anubhav Jain on Sep 12, 2008 3:38 PM

    Hi Raja,
    I did as suggested by you...but it is behaving strangely.
    It works fine in debuging mode but when executed directly ....it is not working.
    the scenario is:
    Thers an image for preview as follows:
    <htmlb:gridLayoutCell columnIndex="3" rowIndex="13">
    <htmlb:i m a g e   s r c = " s _ b _ d e t l . g i f "   a l t = " P r e v i e w   C a r d "   o n C l i c k = " a d d r "   o n C l i e n t C l i c k = " c a l l W i n d o w ( ) ; " /  >
    </htmlb:gridLayoutCell>
    The JS code is:
    f u n c t i o n   c a l l W i n d o w ( )
    <%
    data: title(5),
             fname(20),
             lname(20),
             comp(20),
             addr(20),
             city(20),
             state(20),
             pcode(20),
             country(20),
             phone(20),
             fax(20),
             email(241).
             alt_addr-title = request->get_form_field( 'title' ) .
             alt_addr-firstname = request->get_form_field( 'fname' ) .
             alt_addr-lastname = request->get_form_field( 'lname' ) .
             company = request->get_form_field( 'comp' ) .
             alt_addr-street = request->get_form_field( 'addr' ) .
             alt_addr-city = request->get_form_field( 'city' ) .
             alt_addr-region = request->get_form_field( 'state' ) .
             alt_addr-inhouse_ml = request->get_form_field( 'pcode' ) .
             alt_addr-country = request->get_form_field( 'country' ) .
             alt_addr-tel1_numbr = request->get_form_field( 'phone' ) .
             alt_addr-fax_number = request->get_form_field( 'fax' ) .
             alt_addr-e_mail = request->get_form_field( 'email' ) .
    CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie
              EXPORTING
                name                  = 'FORMFIELDS'
                application_name      = runtime->application_name
                application_namespace = runtime->application_namespace
                username              = sy-uname
                session_id            = runtime->session_id
                data_value            = alt_addr
                data_name             = 'alt_addr'
                expiry_date_rel       = 1.
    %>
    w i n d o w . o p e n ( " . . / z _ b i z c a r d / p r e v i e w . h t m " ,   " W i n E " ,   " w i d t h = 2 4 0 , h e i g h t = 3 0 0 , t o o l b a r = n o , r e s i z a b l e = no ")
    I was doing something similar...created a controller and a view , was calling the controller from window.open method with all other parameters for sizing etc.
    How to pass a structure conatining data,from controller to the view...
    Now in the onCreate event of the page PREVIEW.HTM in using;
    CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
      EXPORTING
        name                  = 'FORMFIELDS'
        application_name      = runtime->application_name
        application_namespace = runtime->application_namespace
        username              = sy-uname
        session_id            = runtime->session_id
        data_name             = 'alt_addr'
      CHANGING
        data_value            = alt_addr.
    and in the layout of PREVIEW.HTM in am using this alt-addr:
    But if put a break point at the onCreate event of preview.htm and the execute i get the values in alt_addr but if i execute directly...it is empty in the layout?
    What is the problem?
    Thanks,
    Anubhav.

  • To close popup page from parent page .

    HI ,
    I want to close the popup page when my parent page is redirected to login page when session gets invalidated.
    with out calling any onload or any kind of functions in popup jsp page.
    In my application when i open a popup page from the main page ,when the session is getting expired parent page is redirected to login ,but still the popup page is in active state.i want it to be closed when the redirect happen for the parent page.
    Please help me in this matter.
    Thanks in advance.

    This is a Javascript question, not a JSP question.
    I'll give only a hint then: get hold of the handle of the popup window so that you can call close() on it.
    If you stucks, please continue at a JS forum. There are ones at webdeveloper.com and dynamicdrive.com. Once again: JSP is completely irrelevant in this question. Just base the problem on the HTML and JS output generated by JSP.

  • Custom pushbutton in ME21N should display a popup window with item details

    Hello,,
    The requirement is to
    1. Add a custom pushbutton in ME21N screen at header level.
    2. The user will select some PO line items and will click on this push button.
        This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
    I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
    Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
    i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
    Please help me to retrive PO line item data and schedule line data.
    Regards,
    Sharah

    JSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
    Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want.

  • Open in new window with different window size

    Does anybody know of a way to make a hyperlink and the window open to a new page where the window size is different from the page before? I want to open to a new page where it's a quicktime thats just in a smaller window.
    thanks!

    David:
    Yes. See this demo page: Opening Item in a New, Precisely Sized Window.
    This demo page has 7 such QT movies on it: PhotoPresenter Animated Slideshow Themes.
    OT

  • Popup window and navigate to home page visual web part SP 2013

    I've a visual webpart where i am inserting items in the list in the button click event as below
    protected void btnSubmit_Click(object sender, EventArgs e)
    SPSite site = new SPSite(SPContext.Current.Site.OpenWeb().Url);
    SPWeb web = site.OpenWeb();
    SPList list = web.Lists["Request"];
    SPListItem item = list.Items.Add();
    item["Title"] = txtBoxTitle.Text;
    item.Update();
    Now after items is being added in the list i want to show popup window with message showing that
    "item has been inserted and click here to go to home page of the site"
    how do i achieve this can anyone help in this
    Note:there is a restriction in our requirement so only sandboxed solution can be used so i want resolution for sandboxed solution 

    You can' t use criptManager.RegisterStartupScript for redirection in sandbox solution.
    Please find the below reference
    http://social.msdn.microsoft.com/Forums/office/en-US/bd37b640-e225-41c0-8344-9f3b52fe0434/open-popup-window-and-redirect-user-to-home-page-in-sandboxed-solution?forum=sharepointdevelopment
    You have one more option to open a popup SP.UI.ModalDialog
    Please find the below reference
    http://msdn.microsoft.com/en-us/library/ff798375.aspx
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx

  • Goto Detail Page to PopUp Window

    I have a page with a repeat region in ASP VBScript. I want to use a Goto Detail Page but to open a PopUp Window with Javascript. This doesn't work for me, as it always goes to the first record:
    <script>
    function opencalinterval(){
    var popurl="/en/calcenter/equipment/edit_calinterval.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & rsAssets.Fields.Item("id").Value %>"
    winpops=window.open(popurl,"","width=600,height=500,scrollbars,")
    </script>
    It works if I use it on a regular hyperlink like this:
    <a href="/en/calcenter/equipment/edit_calinterval.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & rsAssets.Fields.Item("id").Value %>">change</a>

    I'm not sure to understand...can you give me an example or give me a link?
    Thank you!

  • How to load and unload same SWF with different xmlFilePath?

    I have a slideshow on my homepage and try to load and unload same instance with different xmlFilePath based on language on the same page.
    var flashvars = {
            xmlFilePath: escape("http://www.bodto.com.tr/kik.aspx"),
            xmlFileType: "OPML",
            lang: swfobject.getQueryParamValue("lang")    
            //initialURL: escape(document.location)   
          var params = {
            bgcolor: "#000000",  
            allowfullscreen: "true",
            wmode:"transparent",
            allowScriptAccess: "always"
          var attributes = {}
              swfobject.embedSWF("/swf/slideshowpro.swf", "flashcontent", "550", "400", "10.0.0", false, flashvars, params, attributes);
    Actionscript3
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Based on above informations, how could I achieve it?

    Suddenly that code in the following gives me some error
    var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
    my_ssp.xmlFilePath = langPath;
    var fileType = root.LoaderInfo.parameters["xmlFileType"];
    my_ssp.xmlFileType = fileType;
    Access of possibly undefined property LoaderInfo through a reference with static type flash.display:DisplayObject.
    The only code snippet works is
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    for (var param in paramObj) {
       if (param == "xmlFilePath") {
          my_ssp.xmlFilePath = paramObj[param];
       if (param == "xmlFileType") {
          my_ssp.xmlFileType = paramObj[param];

  • How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    Hi
    Please take a look to this thread Re: Can I refresh the browser rather than open a new tab?

  • Iceberg reader will not load fully, it comes up with a blank white page. What can i do to read my books?

    Iceberg reader will not load fully, it comes up with a blank white page. How am i ment tonread my books?
    If not is there anyway i can get a refund to buy the books on ibooks?

    Soapie wrote:
    Iceberg reader will not load fully, it comes up with a blank white page. How am i ment tonread my books?
    If not is there anyway i can get a refund to buy the books on ibooks?
    The only Iceberg app I can find in the app store is a social networking app, not an e-reader. I don't see how you could buy books for it.
    UPDATE: I see that it isn't available in the US app store. To contact the developer find it in your App Store and there will be a link to the developer's support site.

  • I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' it won't go away-'delete' is greyed out-can't access calendar! Help!

    I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' i--t won't go away-'delete' is greyed out--can't access calendar! Help!

    I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' i--t won't go away-'delete' is greyed out--can't access calendar! Help!

  • Popup window with radio button-urgent

    Hi..
    Is ther any functionmodule for dispalying a popup window with radio button ....

    Use This
    K_KKB_POPUP_RADIO2
    I_TITLE   ...                      This is the title                       
    I_TEXT1   ...                      first radio button                      
    I_TEXT2    ...                     second radio button                     
    I_DEFAULT     ...                  default                     
    reward if useful
    Amit Singla

  • Popup windows with annotation

    When I click on an annotation, a litle popup windows is coming in the middle of the screen. Does it exit a way (preferences) to make this popup window to fit the entire screen (easier to read the text inside the popup windows with th vertical scroll bar).

    There is really no way to expand this popup ?
    Because on a PC, Adobe Reader is taking care of the dimensions I gave to this popup.
    I use QuickPdf library to do that. The command is :
    int QuickPDFAddNoteAnnotation(int InstanceID, double Left, double Top,
    int AnnotType, double PopupLeft, double PopupTop,
    double PopupWidth, double PopupHeight, wchar_t * Title,
    wchar_t * Contents, double Red, double Green, double Blue,
    int Open)
    Parameters
    Left The horizontal co-ordinate of the anchor for the annotation
    Top The vertical co-ordinate of the anchor for the annotation
    AnnotType The annotation type:
    0 = Note
    1 = Comment
    2 = Help
    3 = Insert
    4 = Key
    5 = New paragraph
    6 = Paragraph
    Add 100 to any of the above values to suppress the date shown in the popup
    annotation's title
    PopupLeft The horizontal co-ordinate of the left edge of the popup window
    PopupTop The vertical co-ordinate of the left edge of the popup window
    PopupWidth The width of the popup window
    PopupHeight The height of the popup window
    Title The title of the annotation
    Contents The body of the popup annotation
    Red The red component of the color of the annotation
    Green The green component of the color of the annotation
    Blue The blue component of the color of the annotation
    Open Specifies whether to show the annotation when the document is opened:
    0 = hide
    1 = show
    Unfortunatly the Android Adobe reader doesn't take care of theses values and put the popup windows in the middle of the screen
    It's very difficult to read the text on an galaxy SII : too small
    Thanks

Maybe you are looking for