Close popup window and reload parent form


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Close popup window and reload parent form

  1. #1
    Join Date
    Nov 2005
    Posts
    7

    plz help me to solve this problem

    hello dear,

    i m developing a Web Based application.in that when i select a customer name from a dropdown list in web page
    'Quoattion.aspx'. at that time i'll open a web page 'customerDetail.aspx' in a dialog window by using

    showModalDialog('customerDetail.aspx','','').

    now depends upon data present on dialog window ,we have two options (two buttons). first if we want to continue to this

    Quotation then this dialog window will be closed (by pressing one button) and we continue with previous page 'quotation.aspx'

    in prevoius window. second option is that if we want to block this quotation then first of all the dialog window will closed

    and then the web page open in previous window will be refreshed and new blank interface ie web page 'Quotation.aspx' will be

    reloaded in current window (by pressing second button).


    now my problem is that. i m able to close the dialog window (by using self.close() on one button) but i m not able to reload

    the web page 'quotation.aspx' in main window when i close the dialog window.

    so plz tell how i'll perform two operations on click of one button in JavaScript.
    (1) close the dialog window
    (2) reload the web page in current main window.

    waiting for ur reply......

    Ankush

  2. #2
    Join Date
    May 2005
    Location
    UK
    Posts
    278
    This should do the job
    window.opener.location.reload();
    self.close();
    with an iframe on the parent page you need to specify as below, where top is the iframe id
    window.opener.top.location.reload();self.close();

    If you want to do this in code behind as below
    Page.RegisterStartupScript("CLOSE", "<script language='javascript'>window.opener.location.reload();self.close();</script>");
    Sri

Similar Threads

  1. Replies: 0
    Last Post: 07-23-2003, 09:14 PM
  2. Plz Help!!!!
    By Kyle in forum Java
    Replies: 0
    Last Post: 05-14-2003, 04:25 PM
  3. solve this problem urgently
    By manish jaiswal in forum ASP.NET
    Replies: 2
    Last Post: 05-08-2003, 05:14 PM
  4. Replies: 0
    Last Post: 12-11-2002, 06:05 AM
  5. Reliability Problem
    By elise in forum Java
    Replies: 0
    Last Post: 10-30-2002, 05:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center