jquery autocomplete & masterpage

Posted by Caroline on Stack Overflow See other posts from Stack Overflow or by Caroline
Published on 2010-04-29T13:08:30Z Indexed on 2010/04/29 16:37 UTC
Read the original article Hit count: 480

Filed under:
|
|

Hi everyone,

first time posting here, so hello to all :-)

I'm pretty new to the jQuery thing, but I got the autocomplete function running quite well on a simple aspx page.

Now I wanted to use the same function on an aspx-page with a masterpage, and it doesnt work anymore.

this test function works fine:

$(document).ready(function () { $("[id$=AlertButton]").click(function () { alert("Welcome jQuery !"); }); });

but this simply does nothing:

$(document).ready(function () { $("[id$=Suchen]").autocomplete("AutocompleteData.ashx"); });

the javascript and css files are loaded in the master page, just above the contentplaceholder.

the code within the contentplaceholder looks like this:

<atlas:ScriptManager id="SM1" runat="server" EnablePartialRendering="true" >
    <Services>      
      <atlas:servicereference path="~/xxxxx.asmx" />
    </Services>
  </atlas:ScriptManager>
 <script type="text/javascript">
 $(document).ready(function () { 
        $("[id$=Suchen]").autocomplete("AutocompleteData.ashx");        
     });  
</script>

<br /> 
 <asp:Button ID="AlertButton" runat="server" Text="Button" />
<br />
 <asp:TextBox ID="Suchen" Width="250" runat="server"></asp:TextBox>

if I execute the .ashx page on its own, it fires back the expected data...

I've been browsing tons of pages, but couldn't resolve the issue.

I'd be glad for any input!!!

Thanks alot & all the best,

Caroline

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about autocomplete