Jump to content

Recommended Posts

Hello, I'm a total newbie with ajax and was wondering if anyone could point me in the right direction of a tutorial that would help me accomplish what I'm looking to do.  I want to be able to type a phone number into a text field, then hit tab and have the customer info populate from the phone number.

 

Any help greatly appreciated,

thanks in advance!!!!

the query code will be in the php page that your AJAX page is linked to...as far as the tab button is concerned,  i'm not sure how to accomplish this, perhaps you can create a function that will detect when a space/tab has been entered into the field, then act accordingly when this occurs

The javascript function to use is onblur, that's what will retrieve the data after hitting tab.  I'm still looking for a tutorial to explain exactly what I'm looking for though :(

 

I couple that I've found that help are:

http://www.w3schools.com/php/php_ajax_database.asp

http://roshanbh.com.np/2008/04/check-username-available-ajax-php-jquery.html

 

I think I'll be able to figure it out but it's going to take some time to combine these two tutorials!

 

Thanks for the help!  If anyone knows of a tutorial that will retrieve data from a database and populate other fields with an onblur function I would greatly appreciate it!

yeah when you hit tab it will blur the text field, how dumb of me...one of the resources that you have shown should not be fully trusted,as a word of advice

 

visit this thread that gizmo made..http://www.phpfreaks.com/forums/index.php?topic=337995.0

Thanks!

Ya I'm still looking for a tutorial for what I need :( I've made a small amount of progress but unfortunately I suck at javascript :(

 

Right now I'm messing around with http://www.phpsimplicity.com/articles/xmlhttprequest.htm but I'm having a little trouble, I'm sure I'll figure it out though :)

 

Thanks again for the tip! :)

is the customer information stored inside of a database? If so, you will need to use a server side language to extract the data, preferribly PHP of course. For this i would recommend you use either AJAX or JQuery

 

https://developer.mozilla.org/en/AJAX

http://jquery.com/

 

 

basically you will want to use an onblur event that will call an AJAX/Jquery function that will get the customer data from your php file

Exactly, the problem is I'm stupid :)  While I may know PHP and MySQL, I've never really used Javascript before so I'm definitely having a hard time!

 

I'm currently watching a very informative video and it explains at least half of what I want, I still have to work on the onblur function but that'll come after I can actually read data from the db :)

 

Video http://www.tut-cast.com/jquery/php-tutorials-get-data-from-mysql-database-without-refreshing-jquery-video_6cfbfd766.html

 

Thanks :)

Exactly, the problem is I'm stupid  While I may know PHP and MySQL, I've never really used Javascript before so I'm definitely having a hard time!

 

lol...i'm sure you aren't stupid  ;D

well the AJAX link that I gave you will give you a step by step on creating an AJAX xhr and will give examples of sending data to a php file via the get and post methods

Exactly, the problem is I'm stupid  While I may know PHP and MySQL, I've never really used Javascript before so I'm definitely having a hard time!

 

lol...i'm sure you aren't stupid  ;D

well the AJAX link that I gave you will give you a step by step on creating an AJAX xhr and will give examples of sending data to a php file via the get and post methods

 

Thanks for all of your help!!!  I'll definitely look into that!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.