Hi,

Having a problem with Javascript where I am struggling to understand it, The code we have is here;

Code:
		<script type="text/javascript">
		$("#search-field").autocomplete({
			appendTo: "#box",
		    source: function(request, response){
		        $.ajax({
		            url: "http://ff.search.yahoo.com/gossip",
		            dataType: "jsonp",
		            data: {
		                "output": "jsonp",
		                "command": request.term
		            },
		            success: function(data) {
		                var suggestions = [];
		
		                $.each(data.gossip.results, function(i, val) {
		                    suggestions.push(val.key);
		                });
		                
		                response(suggestions);
		            
		            }
		        });
		    }
		});
		
		function setCookie(key, value) {
		            var expires = new Date();
		            expires.setTime(expires.getTime() + (1 * 24 * 60 * 60 * 1000));
		            document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();
		        }
		
		        function getCookie(key) {
		            var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
		            return keyValue ? keyValue[2] : null;
		        }
		        
		       function killCookie(key) {
		                   var expires = new Date();
		                   expires.setTime(expires.getTime() + (-1 * 24 * 60 * 60 * 1000));
		                   document.cookie = key + '=' + '' + ';expires=' + expires.toUTCString();
		               }
		        
		$("#search-field").change(function() {
		  var textValue = $(this).val();
		  setCookie('searchlotto',textValue);
		});
		
		$("#search-button").click(function() {
			killCookie('searchlotto');
		});
		</script>
Now currently it drops down the suggestions while your typing your search, See here;
http://www.searchlotto.co.uk/2012/index.php

Instead of clicking on suggested and it just adds the text to the search bar, I want it to take them to the results page with their search, The results page is static in the sense it has one dynamic piece;

http://www.searchlotto.co.uk/2012/yh...hp?q=xbox&cid=

xbox is the search.

Would someone be able to help?

Thanks
Ross