now i did this, added ' around the following:
ain't getting an error now. purpose of the javascript is to assign the selected items value to the hiddenfield. Haven't got there yet. I just do an alert to test if i get the value successfully. now i get null returned.Code:'<%= this.occupation.ClientID %>'
the source is like this for the javascript:
and for the occupation textbox extenders:Code:<script type="text/javascript"> //<![CDATA[ function IAmSelected( source, eventArgs ) { alert($get('<%= this.occupation.ClientID %>'));}//]]> </script>
Code:Sys.Application.add_init(function() { $create(AjaxControlToolkit.AutoCompleteBehavior, {"completionListCssClass":"autocomplete_list","completionListItemCssClass":"autocomplete_listItem","delimiterCharacters":"","highlightedItemCssClass":"autocomplete_highlighted_listitem","id":"ctl00_ContentPlaceHolder1_GuardianRepeater_ctl01_OccAutoCompleteExtender","minimumPrefixLength":2,"serviceMethod":"GetOccupations","servicePath":"ClService.asmx"}, {"itemSelected":IAmSelected}, null, $get("ctl00_ContentPlaceHolder1_GuardianRepeater_ctl01_occupation")); });Code:Sys.Application.add_init(function() { $create(AjaxControlToolkit.AutoCompleteBehavior, {"completionListCssClass":"autocomplete_list","completionListItemCssClass":"autocomplete_listItem","delimiterCharacters":"","highlightedItemCssClass":"autocomplete_highlighted_listitem","id":"ctl00_ContentPlaceHolder1_GuardianRepeater_ctl03_OccAutoCompleteExtender","minimumPrefixLength":2,"serviceMethod":"GetOccupations","servicePath":"ClService.asmx"}, {"itemSelected":IAmSelected}, null, $get("ctl00_ContentPlaceHolder1_GuardianRepeater_ctl03_occupation")); });




Reply With Quote