Gaurav Taneja

Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

  Home  |   Contact  |   Syndication    |   Login
  90 Posts | 0 Stories | 78 Comments | 7 Trackbacks

News




Google RankGoogle PR™ - Post your Page Rank with MyGooglePageRank.com



The content on this site represents my own personal opinions and thoughts at the time of posting, and does not reflect those of my employer's in any way.

Disclaimer:- All postings in this blog is provided "AS IS" with no warranties, and confers no rights.

Archives

Post Categories

Image Galleries

Atlas

Error

OutLook

SharePointService

Usefull Site Links

Javascript Function for Closing any popup window. 

 

ASPX CODE  

<script language="javascript" type="text/javascript">

    function GetRadWindow()  

        {  

            var oWindow = null;  

            if (window.radWindow) oWindow = window.radWindow;

            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;                  

            return oWindow;  

        }  

 

       

        function CancelEdit()  

        {  

            

            GetRadWindow().Close();

            GetRadWindow().BrowserWindow.location.reload();

            return false;                 

        }

onclick="javascript: CancelEdit();"

[u can use it on aspx as shown here or severside as shown below]

CS CODE

protected void btnClose_Click(object sender, EventArgs e)

    {

        Session[GlobalCommon.KEY_CITY_EDIT] = null;

        RadAjaxPanel1.ResponseScripts.Add("CancelEdit();");

    }

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Thursday, April 03, 2008 8:04 PM

Feedback

# re: Javascript Function for Closing any popup window. 8/21/2010 11:04 PM Siyabulela Mooi
Even Telerik support forums could not help me with this. Thanks a lot. I have been looking fot a solution to this the whole night. Thanks again.

# re: Javascript Function for Closing any popup window. 9/22/2011 3:26 PM chandra
thank you i was missing --GetRadWindow().BrowserWindow.location.reload();

return false;
spend lot of time to figure out


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: