Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8367521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:10:51+00:00 2026-06-09T13:10:51+00:00

heres the code for the index file <!doctype html> <html lang=en> <head> <meta charset=utf-8>

  • 0

heres the code for the index file

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title> tutorial</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>
    <body>
    Search: <input id="search" type="text"/>
    <div id="search_results">
    </div>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/search.js"></script>
    </body>
    </html>

heres my search.js file this is where I need Help. I need help figuring out what values go into the ” marks. Ive tried putting ‘search_results’ and ‘search’ in every combination but it just wont work. Im new to jquery so any help would be greatly appreciated. Thanks!

    $('#search').keyup(function() {
var search_term = $(this).val();
$.post('php/search.php', { search_term: search_term }, function(data) {
    $('#search_results').html(data);

    $('').click(function(){
    var result_value = $(this).text();
    $('').val('', result_value);
    $('').html('');

    });
});
     });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:10:53+00:00Added an answer on June 9, 2026 at 1:10 pm

    That depends upon how your result looks like. If you result contains something like this:

        <div id="search_results">
            <ul>
                <li>Option 1</li>        
                <li>Option 2</li>        
                <li>Option 3</li>        
                <li>Option 4</li>        
                <li>Option 5</li>        
                <li>Option 6</li>        
            </ul>
        </div>​
    

    Then you click handler would change to this:

        $('#search_results > ul > li').each(function () {
            $(this).click(function () {
                $('#search').val($(this).html());
            });            
        });
    

    Demo: http://jsfiddle.net/Srj5Z/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an application in Code Igniter. Unless i declare the <!DOCTYPE HTML>
Here's the code in AlertTableView: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ NSInteger index = 12345; NSLog(@AlertTableView:
Here in this code: $('#doneItem').click(function(){ $(this).each(function(index){ var item = 'personal' + index; alert(item); localStorage.removeItem('personal'
I have found some code on measuring execution time here http://www.dreamincode.net/forums/index.php?showtopic=24685 However, it does
im trying to use direct store in Extjs heres the code to my store
unforunately i cant reproduce it in jsfiddle...... heres my code though regardless: http://jsfiddle.net/nZePr/ basically
I want to get a url from a string. Heres my code to extract
I'm stuck on how to use the 'text-overflow' function. Heres my code: <style type=text/css>
Heres my code: XElement navegacion; public Navegacion() { this.navegacion = XElement.Load(HttpContext.Current.Server.MapPath(App_Data/navegacion.xml)); } It works
I created a TabPanel on my aspx file. In my code behind, I dynamically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.