i have been struggling to find a good autocomplete script with mysql backend.

i now have an easy to use one and all is working, however in my page after the search has been typed and user selected instead of the users name appearing in the search box i want it to go to that users profile.

so go to url: users_detail.php?uid=

however i am not sure what i need to do in the javascript for this to happen:

<script type="text/javascript">
var inputSearch = $(this).val();
var dataString = 'searchword='+ inputSearch;
    type: "POST",
    url: "search.php",
    data: dataString,
    cache: false,
    success: function(html)
}return false;    

    var $clicked = $(e.target);
    var $name = $clicked.find('.name').html();
    var decoded = $("<div/>").html($name).text();
jQuery(document).live("click", function(e) { 
    var $clicked = $(e.target);
    if (! $clicked.hasClass("search")){

many thanks

Recommended Answers

All 2 Replies

you want redirect to a page from javascript maybe?


added in the link in php file around the results in repeat array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.