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 9285329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:08:04+00:00 2026-06-18T19:08:04+00:00

I have a HTML input that a user will type into. After every key

  • 0

I have a HTML input that a user will type into. After every key a JQUERY event will grab the text written so far and make an AJAX call that will be picked up by PHP.

I have done this before and its easy to have a PHP script that is called that will then deal with the data passed – eg: db calls and return what is required.

Question – Is it possible to do this using a PHP object? (I’m writting OOP PHP for the first time). Is there some way to combine an AJAX call with a PHP Object or should the PHP end just be a standard function?

thank you

* More info: this function is searching for a location against a database with 6million suburbs/postcodes. Each key a user types a jquery event it trigger that creates an ajax call with the letters typed so far. PHP is called and a SQL query run to return possible locations.

  • 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-18T19:08:06+00:00Added an answer on June 18, 2026 at 7:08 pm

    You can combine a PHP object with an AJAX call, but you’d have to explain what you’re trying to do in greater detail for me to determine whether or not it would help you.

    It sounds like you just want an AJAX call that is invoked after say, 500ms of a user not giving input to the text box or whatever. That seems like a standard PHP update function.

    Based on what you’ve stated so far, I would suggest you just go with the AJAX; have it proc off an onKeyUp, onKeyPress, or whatever you want, and then run some PHP.

    Recall that you can create a timer in many fashions; just search around here. You probably don’t want to use AJAX for each key stroke.

    OnKeyUp JavaScript Time Delay?

    Hope that helps.

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

Sidebar

Related Questions

I have an HTML form that needs multiple submit buttons, like this: <input type=submit
I have a set of html text boxes that take input and when the
I have an input field that a user can type in. I'm trying to
I have an HTML table that contains some 500 rows. I have an input
I have a JS script that appends to the HTML page the pairs: input
i have the following problem with that code in my html tag: <div id=searchbar><input
In my HTML code, I have a form tag that contains two input boxes,
Newbie question... The objective: I intend to have an HTML text input field as
I have HTML like this: <input type=radio name=type value=FL checked=checked />Fixed <input type=radio name=type
I have a home page that contains a texfield that reads the user input,

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.