Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET Javascript
Hello Professionals,
 
I have One Issue something like this
I have Commmon Search Page Search.aspx, that have dropdown and gridviw that are bound dynamically.
I have Other pages like doctor.aspx,reference.aspx
From that pages i have called search.aspx in model pop-up iframe.
i am passing parameters by session from every page to bind dropdown and gridview.
and searchpage.aspx is searching well
But
Problem is that gridview has view link button and in it's Row Command event i want to close the model popup and reload the previous page cause on Row command i want to fill textboxes of previous page(like doctor.aspx).
 
i have tried with javascript window.close(); but unsuccessful...
any help???
suggestions are also welcomed....
Posted 21-Mar-13 20:59pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You cannot just write window.close(). This is an instance function; you need to call it with some window instance you created before.
 
Please see my past answer and the code sample: Close one page when parent page is closed[^].
 
Are you getting the idea?
 
—SA
  Permalink  
Comments
Devang Vaja at 22-Mar-13 2:14am
   
see my gridview is in searchPage.aspx is in iframe src which is in modelpopup i want to close model pop up and reload the "opener page".... on row_Command
Sergey Alexandrovich Kryukov at 22-Mar-13 2:21am
   
Is you pop up a browser window, or something else? You were asking about using window.close()...
—SA
Devang Vaja at 22-Mar-13 2:49am
   
in doctor.aspx i have button search on search_click event i have done modelpopup.show();
in model pop up i have put i frame and in i frame i have given src of search.aspx which has gridview and its row_command
 
now on gridview_rowcommand i want to close the model popup...
Sergey Alexandrovich Kryukov at 22-Mar-13 3:13am
   
How about exact reference to modelpopup object documentation. In all cases, it should be an instance function, like myPopup.close(), myPopup.hide(). You need to use a variable referencing your previously created object. If this is based on some available HTML element (a typical situation), there is no close, you should hide it; it usually has hide() function.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 120
4 DamithSL 95
0 OriginalGriff 6,045
1 DamithSL 4,611
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 22 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100