SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    IN
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Searching Autosuggest list which can be called with 2 db strings.

    Hi Forum,

    I am looking for a autosuggestion list for my website......where I can call 2 db strings as per the changing of user selection...

    1. Search By Company
    2. Search By Product

    If anybody know the link where I can get this kind of script....so...It would be great....


    Thanks for your consideration..

    Thanks!

  2. #2
    SitePoint Wizard frank1's Avatar
    Join Date
    Oct 2005
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by krsm1980 View Post
    Hi Forum,

    I am looking for a autosuggestion list for my website......where I can call 2 db strings as per the changing of user selection...

    1. Search By Company
    2. Search By Product

    If anybody know the link where I can get this kind of script....so...It would be great....


    Thanks for your consideration..

    Thanks!
    what auto suggest does
    it take some values and return some values
    and it normally has a javascript or jquery function and php page
    in your either case either company or product ,the script should behave same(just querying and returning different values)

    so if i were you,i would introduce an extra parameter in javascript or jquery ....like 1 and 2 ..(1=company, 2 for ... so on) and pass it to php page which makes query through js function and make if statement based on it
    if (value==1)
    query company
    return company
    else if value==2
    query products..

    so if you do so,you dont need any extra custom scripts and make any autosuggest code work for your requirement...

    atleast that is what i do or what i did

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2010
    Location
    IN
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by frank1 View Post
    what auto suggest does
    it take some values and return some values
    and it normally has a javascript or jquery function and php page
    in your either case either company or product ,the script should behave same(just querying and returning different values)

    so if i were you,i would introduce an extra parameter in javascript or jquery ....like 1 and 2 ..(1=company, 2 for ... so on) and pass it to php page which makes query through js function and make if statement based on it
    if (value==1)
    query company
    return company
    else if value==2
    query products..

    so if you do so,you dont need any extra custom scripts and make any autosuggest code work for your requirement...

    atleast that is what i do or what i did
    Thanks frank,

    I appreciate your time and consideration...............and help....

    But I am not that much familiar with JS.....so I am unable to create my own.....but If you can help me out to show me a pre made script or tutorial....that would be great......

    Thanks for your you reply.

    Thanks a lot.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •