yahoo.com input text search box

Discussion in 'JavaScript' started by crazy.works, Jun 18, 2009.

  1. #1
    hello,
    i wanna learn how to make input text search box like the one in yahoo.com..,

    with the tabs above the input text
    " Web - Images - Video - Local - Shopping - More "
    and those tabs changing the name on the search button too.

    beside the "suggestions tab" button under the input text .

    i mean the full search box exactly like yahoo.com .

    so please any body can help me on that ??
    or there are any free code already programmed like it which i can have it to learn how it done ??

    thanks a lot
     
    crazy.works, Jun 18, 2009 IP
  2. ToddMicheau

    ToddMicheau Active Member

    Messages:
    183
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Heh, well it's a bit more complicated than it seems, it has a huge database of suggestions- I don't think this is something anyone other than a web indexing company can make. . . But that's just me.

    Basically their suggestion box is alot of javascript, they use jQuery. It's just an input box that uses jquery to call to a script:

    http://sugg.search.yahoo.net/sg/?output=fxjsonp&nresults=10&command=queen

    That outputs something like this:

    fxsearch(["queen",["queen elizabeth","dairy queen","queen mary","queen latifah","queen lyrics","queen rania","queen victoria","queens college","queensryche","king of queens"],[],[]]);

    That is then parsed by jquery and added into the div under the input box.

    Honestly if you want the same quality then you'll have to leech from their script. . .
     
    ToddMicheau, Jun 18, 2009 IP
  3. crazy.works

    crazy.works Peon

    Messages:
    304
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for this helpful reply, but i really tried to leech from their script ,lol :D
    but unfortunately i failed and i didn't succeed to get the jquery on exactly like yahoo.com :)

    so please anybody can help ??

    thanks a lot
     
    crazy.works, Jun 19, 2009 IP
  4. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #4
    he's only after the interface with the tabbed options... which is half an hour's worth of work.
    lol, yahoo using jquery, how do you come up with stuff like that :D

    GOOGLE for yahoo user interface (YUI), it's their own and rather good framework, or at least-more powerful than jquery's.

    anyway, what he really needs is a script that:
    builds a class based NN number of links with associated click events that alter the parameters and buttons of a search form. the bit where it parses the JSONP and produces a set of results suggestions is pretty common also, although most companies go with ajax and not comet.
     
    dimitar christoff, Jun 21, 2009 IP