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

uncaught referenceerror ConfirmDelete not found

1 Answer 44 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Gotcha
Top achievements
Rank 1
Gotcha asked on 12 Jan 2012, 04:19 PM
Hi,

 I have a Page 1 (using a Master) calling a dynamic UserControls. One of the Control UC1 has a RadGrid and a bunch of Client Side Javascripts to handle the onclientclicking of the gridTemplateColumns button or to handle onrowclick of the grid.

The Scripts are declared in the UC1 in a Telerik:RadCodeBlock. Initially, the page loads UC1 ( which has the grid and the js) and it works as expected... ( ie all Javascript is correctly loaded and functional). The Page 1 has some kind of custom Tab Control ( Non-telerik), which triggers a partial post back and regenerates the content of the placeholder by calling a different UC2 which does NOT have any javascript.

So far so good. Now in the logic of the page load of this Page 1, it keeps track of the last selected UC... In this case it is UC2, If I navigate to another Page 2, and come back to Page 1, UC2 is dynamically generated. When I click on TAB 1, to load UC1 ( which has the javascripts), this is where I get an uncaught reference error : ConfirmDelete is not found. ( which is one of the JS declared in the UC1 RadCodeBlock).

What am I doing wrong?

Thanks

1 Answer, 1 is accepted

Sort by
0
Gotcha
Top achievements
Rank 1
answered on 13 Jan 2012, 01:21 PM
I substituted the RadCodeBlock with RadScriptBlock... and this ensures the script being accessible on partial post backs
Tags
Ajax
Asked by
Gotcha
Top achievements
Rank 1
Answers by
Gotcha
Top achievements
Rank 1
Share this question
or