Hi,

I can't get the autocomplete plugin working when the page also loads
the jquery ui file. Is there an easy way to fix this?

My test case:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <script src="js/jquery-1.2.6.js" type="text/javascript"></script>
    <script src="js/jquery.autocomplete.js" type="text/javascript"></
script>
    <script  src='js/jquery.bgiframe.js' type='text/javascript'></
script>
    <script src="js/jquery.ui.all.js" type="text/javascript"></script>
    <link rel="stylesheet" href="css/jquery.autocomplete.css"
type="text/css" media="screen" />
    <link rel="stylesheet" href="css/rgw.css" type="text/css"
media="screen" />
    <title>test autocomplete</title>
    <script type="text/javascript">
    $(document).ready(function(){
       var data = "Steve Roger Adam John".split(" ");
       $("#autofield").autocomplete(data);
    })
    </script>
  </head>
  <body>
    <form>
      <input type="text" id="autofield" name="autofield" />
    </form>
  </body>
</html>

Removing the script tag which loads jquery.ui.all.js fixes the
problem.

Thanks,
Andrej

Reply via email to