Calendar Control

Last post 03-21-2007 12:53 PM by PLBlum. 2 replies.

Sort Posts:

  • Calendar Control

    03-21-2007, 12:09 AM
    • Loading...
    • texan2006
    • Joined on 08-27-2006, 5:07 PM
    • Posts 19

     

    I have a Calendar Control on one page and I am adding new events to it through a form. The form is in a popup window..

    I want to refresh my calendar after adding any new event to it after closing the popup window. How can I raise Page Load & Dayrender event again on the main Calendar page.

     

    Any ideas?

  • Re: Calendar Control

    03-21-2007, 9:24 AM
    Answer
    • Loading...
    • pixelsyndicate
    • Joined on 07-04-2003, 12:56 PM
    • W. MI transplant in N. TX
    • Posts 1,082

    Howdy Fellow Texan!

    You might consider calling a javascript method from your calendar popup page that will call back to the "window.opener"

    I am no great JavaScript Guru, but this is the code I wrote when I wanted to return the square foot value from one popup window to a field on the parent page.

    function returnSqft()
    {
    // check to see if the window has an opener and it isn't closed
    if(window.opener && (!window.opener.closed))
    {
    // call a method on the opener page, passing it a value
    window.opener.setDeposit(sval);
    // now close my popup window
    window.close();
    }
    }

     Perhaps you might use a clientside javascript method to 'refresh' the parent page as I called a javascript method called setDeposit() in the above example! :) 

    From a recent Yankee Transplant...

    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools." ~ Douglas Adams

    http://pixelsyndicate.com/ps/
    Filed under: ,
  • Re: Calendar Control

    03-21-2007, 12:53 PM
    • Loading...
    • PLBlum
    • Joined on 06-28-2002, 1:20 PM
    • Boston, MA
    • Posts 5,172
    • TrustedFriends-MVPs

    I agree that you will be using window.opener. The previous suggestion doesn't show how to cause a postback. Normally you call the __doPostBack() method that is on the window what you want to postback. Its the same here, except you need to know that window.opener is actually the window you need:

    window.opener.__doPostBack("ClientID of the control that causes the postback", "");

    ClientID can be from the Calendar's ClientID property.

    --- Peter Blum
    Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
    www.PeterBlum.com
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter