Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9307357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:22:34+00:00 2026-06-19T00:22:34+00:00

I have a popup window, which will search for items from a grid. It

  • 0

I have a popup window, which will search for items from a grid. It returns value to the parent page, when a row is selected directly. But if i search the grid by button click and select a row, the parent page receives undefined object, although the correct values are returned from the popup. How can the parent page receive the correct values?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:22:36+00:00Added an answer on June 19, 2026 at 12:22 am

    OP did mention this in a comment on the question, but to make it clear: this answer is a copy of this one by user ConnorsFan. If the answer is updated, that’s likely where any updates will appear.


    In order to keep using showModalDialog in my page, I had to come up with my own workaround for the bug. So, here it is…

    In Google Chrome, after a postback, showModalDialog always returns undefined. However, the window.opener property in the modal dialog points to the caller window, even after postbacks. So, I thought about putting the result of the dialog in the returnValue property of that caller window. And it works.

    In the caller window:

    var prevReturnValue = window.returnValue; // Save the current returnValue
    window.returnValue = undefined;
    var dlgReturnValue = window.showModalDialog(...);
    if (dlgReturnValue == undefined) // We don't know here if undefined is the real result...
    {
        // So we take no chance, in case this is the Google Chrome bug
        dlgReturnValue = window.returnValue;
    }
    window.returnValue = prevReturnValue; // Restore the original returnValue
    

    At this point, use dlgReturnValue for further processing
    In the modal dialog window:

    if (window.opener)
    {
        window.opener.returnValue = dateValue;
    }
    window.returnValue = dateValue;
    self.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to android development. I have created a popup window which is
I have some problem with my open new window popup which it can read
I have a popup window (selectReasonCode) that is opened up from a button. The
I have an html page that open a popup window when the page loads.
I have a main form window which will pop up a new form window.
I have one sharepoint custom page application which is rendering from a user control.
I have the button on which i am showing the popup window. this button
Creating a popup window from main page with window.open, the child/popup page uses the
I have a gridview inside updated panel on parent page which is populated based
I have a controller that listens on $scope.$on , which will show a popup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.