I've got one aspx page with multiple usercontrols. Page is like this,
<asp:Content ID="Content2" ContentPlaceHolderID="chpMainBody" runat="server">
<en:ProfileInfo ID="ucProfileInfo" runat="server" />
<br />
<en:WorkingExperienceInfo ID="ucWorkingExperienceInfo" runat="server" />
<br />
<en:TechnicalInfo ID="ucTechnicalInfo" runat="server" />
<br />
<en:EducationInfo ID="ucEducationInfo" runat="server" />
</asp:Content>
I use this script in each user control for dropdownextender with treeview, this is for "ucEducationInfo" usercontrol
<script type="text/javascript">
var DDE4;
var DDE5;
function pageLoad() {
DDE4 = $find('<%= dde_CountryUniversity.ClientID %>');
DDE5 = $find('<%= dde_UniversityMajors.ClientID %>');
DDE4._dropWrapperHoverBehavior_onhover();
DDE5._dropWrapperHoverBehavior_onhover();
$get('<%= pnl_CountryUniversity.ClientID %>').style.width = $get('<%= txt_CountryUniversity.ClientID %>').clientWidth;
$get('<%= pnl_UniversityMajors.ClientID %>').style.width = $get('<%= txt_UniversityMajors.ClientID %>').clientWidth;
if (DDE4._dropDownControl) {
$common.removeHandlers(DDE4._dropDownControl, DDE4._dropDownControl$delegates);
}
if (DDE5._dropDownControl) {
$common.removeHandlers(DDE5._dropDownControl, DDE5._dropDownControl$delegates);
}
DDE4._dropDownControl$delegates = {
click: Function.createDelegate(DDE4, ShowMe),
contextmenu: Function.createDelegate(DDE4, DDE4._dropDownControl_oncontextmenu)
}
DDE5._dropDownControl$delegates = {
click: Function.createDelegate(DDE5, ShowMe),
contextmenu: Function.createDelegate(DDE5, DDE5._dropDownControl_oncontextmenu)
}
$addHandlers(DDE4._dropDownControl, DDE4._dropDownControl$delegates);
$addHandlers(DDE5._dropDownControl, DDE5._dropDownControl$delegates);
}
function ShowMe() {
DDE4._wasClicked = true;
DDE5._wasClicked = true;
}
but i noticed scipt works only "ucEducationInfo" usercontrol. i tried with changing usercontrol's line and i think it is because of the user control is at the end of the page. i m not good with javascript. what is wrong?