This is a migrated thread and some comments may be shown as answers.

Javascript in advanced edit/insert form doesn't work when inside updatepanel

5 Answers 118 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Troy
Top achievements
Rank 1
Troy asked on 30 Jun 2009, 01:07 PM
When I wrap the scheduler in an updatepanel, the javascript stops working. When I click "recurring", nothing happens. When I remove the updatepanel, everything works fine.

5 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 30 Jun 2009, 01:38 PM
Hello Troy,

RadScheduler and the UpdatePanel should not have any problem interacting together. I am attaching a simple test project. There is probably a third factor that causes a javascript error and causes all other javascript execution to halt. Do you wrap only the Scheduler in the UpdatePanel? Can you please check if the browser shows any Javascript errors?

Best wishes,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Troy
Top achievements
Rank 1
answered on 30 Jun 2009, 01:44 PM
Thank you, you were correct, there was another js error. In an unrelated question, whenever the page loads for the 1st time, the calendar is very small. If I  reload the page, it is in full size. Someone suggested calling the repaint method, but that did not work. Any ideas?

<script type="text/javascript">       
        function pageload() {  
            var scheduler = $find('<%= RadScheduler1.ClientID %>');  
            scheduler.repaint();  
        }  
    </script> 
0
Dimitar Milushev
Telerik team
answered on 30 Jun 2009, 02:35 PM
Hi TROY,

What height is set to RadScheduler? Such issues depend a lot on the HTML markup of your page and especially the containers of RadScheduler. You should use a tool like Firebug or the Internet Explorer Developer Toolbar to inspect parent elements of RadScheduler to see if one of them does not resize properly (probably needs height set). This sometimes happens with tables in IE. Do you have the same problem in Firefox?

Regards,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Troy
Top achievements
Rank 1
answered on 30 Jun 2009, 03:48 PM
Ok, I will look into the height issue. Back to my previous issue. I found out something else. I'm using a custom AdvancedEditForm, so I have to reference the js for that. I have teh script manager in the master page and if I reference the js there, all js fails on all the pages that do not have the scheduler control. On the page that has the control, it works. I assume some how I have to reference the js file only on that page. In addition, I can't just put it in the head, because the scheduler is in a MultiView that is only shown after a postback. Please help.
0
Peter
Telerik team
answered on 01 Jul 2009, 01:30 PM
Hi TROY,

You can use ScriptManagerProxy to register the script file on the page with RadScheduler. Let us know if you experience any problems with this approach.


Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Troy
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Troy
Top achievements
Rank 1
Peter
Telerik team
Share this question
or