473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

help with ajax and javascript in php

so basically i have a form which has an input type text for id and then i also have a input type text for name..

and then i also have a query in which it gets the matching name for that id.

sample : sql = "select name from names where id = '".$id."'";

how can i implement this concept in which, you can input the id and then the name of that corresponding id which automatically display in the name textbox..

Expand|Select|Wrap|Line Numbers
  1. <label>Id</label>
  2. <input type="text" name="id" id="id"/>
  3.  
  4. <label>Name</label>
  5. <input readonly="text" name="name" id="name" value="" />
  6.  
im new to javascript and ajax so i dont really know my way around it very much...i would really appreciate your help
Feb 13 '12 #1
1 1132
YarrOfDoom
1,247 Expert 1GB
Have a PHP-script output the value so an XMLHttpRequest-object in Javascript can request it.
You can find the details on how to do this here: W3Schools AJAX Tutorial
Feb 16 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: kevin | last post by:
meta refresh tag is failing , it is supposed to go to the entry1.htm site which is the flash swf file but it doesn't check code please http://members.optusnet.com.au/~kevindauth/ thanks...
2
by: sneill | last post by:
MXLogic, a Denver, Colorado based software company with 100+ employees is looking for candidates with **VERY STRONG** AJAX, Javascript, HTML, and CSS skills. Our company is building...
4
by: Trip | last post by:
Please if someone can help me !!! I need client and server code(principle based on AJAX) for next problem: i have 3 <select> tags on html page.(it must be NO page reload(callback) only...
2
by: Yorian | last post by:
Hi, Another problem another question (as usual). I want to retrieve data through ajax, within the data there is some javascript which needs to be used (I figured that one out using eval ())....
2
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously...
3
by: farukcse | last post by:
Hi, Can any one tell me how to assign a php variable value using ajax / javascript? Regards, Faruk Chowdhury
1
by: Zwalker | last post by:
Help with Javascript turned off, new flashdrive version needed, to view YouTube even though Javascript is turned on and new flashdrive version installed.
21
by: wizdom | last post by:
I've tried a few things but nothing seems to work, i'm starting to think this isnt possible. I basically am looking to have the user click on the video number, then have the video load in its own...
4
by: djemmers | last post by:
hi all, I have a site running where ppl can add their events into a database. when they choose a country from a listbox, a second listbox (province gets filled with options depending on the...
29
by: FreshRob | last post by:
I have been trying to fix this issue the whole of today and have gotten no where. I am developing a new website, and wanted it to display a webpage in lightbox and have an external page added to the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.