Popup from Calendar control

Discussion in 'ASP .Net' started by Peter, Aug 1, 2005.

  1. Peter

    Peter Guest

    Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control?

    I am trying to create an event calendar similar to how Outlook works. When user clicks on the day number in the calendar control I want to display a popup window and let user add data and click on the Save button. The code under the save button will save the data to the database and close the popup window.


    Thanks


    Peter
     
    Peter, Aug 1, 2005
    #1
    1. Advertisements

  2. Look at http://www.codeproject.com/aspnet/MellDataCalendar.asp





    "Peter" wrote:

    > Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control?
    >
    > I am trying to create an event calendar similar to how Outlook works. When user clicks on the day number in the calendar control I want to display a popup window and let user add data and click on the Save button. The code under the save button will save the data to the database and close the popup window.
    >
    >
    > Thanks
    >
    >
    > Peter
    >
    >
     
    =?Utf-8?B?Sm91bmkgS2FycHBpbmVu?=, Aug 1, 2005
    #2
    1. Advertisements

  3. Peter

    Peter Guest

    Thanks for your help!

    Unfortunatly the example does not have any popup windows and that's my main
    problem.

    How do I display a modal popup window when I user clicks on the day number
    link?


    "Jouni Karppinen" <> wrote in
    message news:...
    > Look at http://www.codeproject.com/aspnet/MellDataCalendar.asp
    >
    >
    >
    >
    >
    > "Peter" wrote:
    >
    >> Does anyone have an example of how you would do a popup window when a
    >> user clicks on a day number link in the ASP.NET Web Calendar control?
    >>
    >> I am trying to create an event calendar similar to how Outlook works.
    >> When user clicks on the day number in the calendar control I want to
    >> display a popup window and let user add data and click on the Save
    >> button. The code under the save button will save the data to the
    >> database and close the popup window.
    >>
    >>
    >> Thanks
    >>
    >>
    >> Peter
    >>
    >>
     
    Peter, Aug 1, 2005
    #3
  4. On example OnDayRender-method is overridden. In my event calendar day number
    isn't clickable at all, instead all event names are shown as hyperlinks for
    each day.

    Here few ideas:

    protected override void OnDayRender(TableCell cell, CalendarDay day)
    {
    //Alternative 1:
    cell.Text = "<a href=\"#\" onclick=\"javascript:alert('foo')\">Click me</a>";

    //or alternative 2 - not tested:
    HyperLink newLnk = new HyperLink();
    newLnk.NavigateUrl = "#";
    newLnk.Attributes.Add("onclick", "javascript:alert('foo')");
    newLnk.Text = "Click me";
    cell.Controls.Add(newLnk);

    base.OnDayRender (cell, day);
    }

    I haven't tested alternative no. 2, I don't know if you can set hyperlink
    only to fire javascript-event without setting NavigateUrl property.

    Hope this helps.

    "Peter" wrote:

    > Thanks for your help!
    >
    > Unfortunatly the example does not have any popup windows and that's my main
    > problem.
    >
    > How do I display a modal popup window when I user clicks on the day number
    > link?
    >
    >
    > "Jouni Karppinen" <> wrote in
    > message news:...
    > > Look at http://www.codeproject.com/aspnet/MellDataCalendar.asp
    > >
    > >
    > >
    > >
    > >
    > > "Peter" wrote:
    > >
    > >> Does anyone have an example of how you would do a popup window when a
    > >> user clicks on a day number link in the ASP.NET Web Calendar control?
    > >>
    > >> I am trying to create an event calendar similar to how Outlook works.
    > >> When user clicks on the day number in the calendar control I want to
    > >> display a popup window and let user add data and click on the Save
    > >> button. The code under the save button will save the data to the
    > >> database and close the popup window.
    > >>
    > >>
    > >> Thanks
    > >>
    > >>
    > >> Peter
    > >>
    > >>

    >
    >
    >
     
    =?Utf-8?B?Sm91bmkgS2FycHBpbmVu?=, Aug 2, 2005
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephajn Craig

    Javascript PopUp using Calendar Control

    Stephajn Craig, Jul 22, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    789
    Saravana
    Jul 23, 2003
  2. Shevek
    Replies:
    3
    Views:
    6,490
    Shevek
    Jun 23, 2004
  3. Vishal
    Replies:
    2
    Views:
    1,092
    Pradeep
    Dec 10, 2004
  4. =?Utf-8?B?QXZhbnRp?=

    calendar control Popup.

    =?Utf-8?B?QXZhbnRp?=, Feb 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,704
    Frank Buchan
    Feb 11, 2005
  5. rockdale

    Non-popup calendar control?

    rockdale, Sep 1, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    763
    rockdale
    Sep 1, 2006
  6. Rudi Hausmann

    PopUp-Calendar-Control

    Rudi Hausmann, Feb 22, 2007, in forum: ASP .Net
    Replies:
    9
    Views:
    571
    Rudi Hausmann
    Feb 23, 2007
  7. Shevek
    Replies:
    0
    Views:
    578
    Shevek
    Jun 23, 2004
  8. Jens Peter Hansen
    Replies:
    7
    Views:
    877
    Randy Webb
    Jun 19, 2004
Loading...