473,387 Members | 1,573 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,387 software developers and data experts.

Further PHP and AJAX MySQL Database Problem

This problem relates to modifying the code in the PHP and AJAX MySql Database Example in http://bytes.com/forum/thread608395.html.

In that example, the value selected in the HTML form is from a drop down menu:
Expand|Select|Wrap|Line Numbers
  1. <body><form> 
  2. Select a User:
  3. <select name="users" onchange="showUser(this.value)">
  4. <option value="1">2000001</option>
  5. <option value="2">2000002</option>
  6. <option value="3">2000003</option>
  7. <option value="4">2000004</option>
  8. </select>
  9. </form><p>
  10. <div id="txtHint"><b>User info will be listed here.</b></div>
  11.  
I am trying to get the same result but with an "input" rather than "select"
Expand|Select|Wrap|Line Numbers
  1. <form> 
  2. Select a User:
  3. <input type="text" name="users" onchange="showUser(this.value);">
  4. </form><p>
  5. <div id="txtHint"><b>Phoenix Part Number Will Be Listed Here.</b></div>
  6.  
It does not appear that the value is being passed to the php script. Is there some different coding required when the value is created from "input" rather than "select"?

Thanks,

Paul Cardin
Sep 18 '08 #1
1 1484
Atli
5,058 Expert 4TB
Hi.

When using the <input type="text"> element, you should use the onkeyup, or one of the other onkey events. The onchange event won't work as it does on the <select> element.
Sep 20 '08 #2

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

Similar topics

1
by: peter.konda | last post by:
Hello! I have been busting my head with a problem, that goes like this: 1. with a first ajax call to the server(apache 2.0 + php), I create a temporary table like this: create temporary table...
1
by: rocksoft | last post by:
Hi, i have devloping web application in Asp.net and c#, i have used ajax to achieve the auto complete text box, my company using visual studio 2003, ajax auto complete text box...
6
jafarsalam
by: jafarsalam | last post by:
hi; I'm new to PHP and AJAX MySQL codes. I found a simple code for PHP and AJAX MySQL Database communication on : http://www.w3schools.com/php/php_ajax_database.asp I downloaded the code and...
6
by: John Doe | last post by:
Here's my issue: I have an instant messenger type feature for my site, its basically an ajax IM feature. I run with a mysql backend on the site, i have a div on my main page that runs a javascript...
1
by: hesameagle | last post by:
Hi I want to use ajax to connect to database and echo some data in my page, I wrote these two codes that can handle my need: index.php ----------------------------------------- <?php ...
1
by: jmohan | last post by:
Dear Sir/Madam, I develop a website in asp.net with c#. And also, I develop a toolbar in the toolbar studio separately. Aim of the Website: Enabling the visitors to become a member of our...
4
abdoelmasry
by: abdoelmasry | last post by:
Hi Prof's im new in ajax i need some help i wanna create active web page linked to mysql database i mean .. i open my page , it will automatically view database contents
3
by: jarremw | last post by:
hello all, what i have is a modal popup control extender, i have an ajax script that saves the value of the two textboxes that are in the popup, what i am needing is a way to insert those values into...
1
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.