jquery ui Autocomplete causing error with headers
<p>I'm getting an error when trying to redirect. It only started after I installed a search box with autocomplete. When I pull the bit of code out, the page redirects properly again. I know it isn't my php.ini settings.</p>

<p>This is the error I'm getting:</p>

<blockquote>
  <p>Warning: Cannot modify header information - headers already sent by
  (output started at /home/content/67/6231767/html/nav.php:9) in
  /home/content/67/6231767/html/admin/includes/functions2.php on line 7</p>
</blockquote>

<p>Here is the code that is causing the problem. Thanks for your help!</p>

<pre><code>$(function() { $.ajax({
        url: "/admin/includes/links.xml",
        dataType: "xml",
        success: function( xmlResponse ) {
            var data = $( "link", xmlResponse ).map(function() {
                return {
                    value: $( "title", this ).text(),
                    id: $( "url", this ).text()
                };
            }).get();
            $( "#tags" ).autocomplete({source: function (request, response) {
                    var term = $.ui.autocomplete.escapeRegex(request.term)
                        , startsWithMatcher = new RegExp("^" + term, "i")
                        , startsWith = $.grep(data, function(value) {
                            return startsWithMatcher.test(value.label || value.value || value);
                        })
                        , containsMatcher = new RegExp(term, "i")
                        , contains = $.grep(data, function (value) {
                            return $.inArray(value, startsWith) &lt; 0 &amp;&amp;
                                containsMatcher.test(value.label || value.value || value);
                        });

                    response(startsWith.concat(contains));
                },
                select: function( event, ui ) { window.location.href = ui.item.id; }
            });
        }
    });
});
</code></pre>
