Results 1 to 4 of 4

Thread: Calling a javascript function disables calendar extender

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2012
    Posts
    34

    Calling a javascript function disables calendar extender

    I have a script manager and calendar extender on my aspx page. When I call a javascript function from my code behind page, the calendar extender doesn't work
    anymore. I call it like this:
    ScriptManager.RegisterStartupScript(Page, this.GetType(), "javascriptfunction", "<script language=javascript>function();</script>", true);
    OR
    Page.ClientScript.RegisterStartupScript(this.GetType(), "javascriptfunction", "<script language=javascript>function();</script>", true);

    Any ideas?

    Thank you.

  2. #2
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    India
    Posts
    310

    Re: Calling a javascript function disables calendar extender

    There may be an error in your JS. Check JS error.
    Which version u r using?
    Sagar
    VB6, VB.net,C#,ASP, ASP.net MSSQL, MYSQL

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2012
    Posts
    34

    Re: Calling a javascript function disables calendar extender

    Thanks for your reply. The javascript doesn't seem to error as it accomplishes what it's supposed to. The javascript function in the .aspx page starts as
    window.onload = function () {
    code here....
    }

    and them I'm calling it in the gridview databound event:
    ScriptManager.RegisterStartupScript(Page, this.GetType(), "javascriptfunction", "<script language=javascript>function();</script>", true);
    Last edited by devquest123; Jan 24th, 2013 at 09:42 AM.

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,605

    Re: Calling a javascript function disables calendar extender

    You can try using these on page_loadcomplete
    CalendarExtender.EnsureValid
    CalendarExtender.Databind
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width