473,815 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Further PHP and AJAX MySQL Database Problem

1 New Member
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 1508
Atli
5,058 Recognized Expert Expert
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
3480
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 peter select * from some_table limit 0,0; That creates an empty temporary table with the same structure as some_table. I use mysql 4.023. I use php call mysql_connect to connect to the mysql database. 2. I create a second ajax call to the server...
1
5196
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 working fine with ms sql database, but it throughing some script error and not working, anybody to help me to solve this problem, how to make the ajax compatible with mysql database,i'm using following ajax method public DataTable...
6
9759
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 uploaded to my server but it does not work . I script does not display the data from the database. Can anyone look at this and help me out.
6
1952
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 timer to load the php page via ajax every 15 seconds which checks the "pinguser" table to see if the user has any chat requests, then echoes them to a div on the page. what i REALLY want to do is have the ajax page see if there is a ping for the...
1
2988
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 //This file is text.php
1
2475
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 webiste by downloading the toolbar from our website. After the member downloads the toolbar, The toolbar is added to the ie browser. The member can get the facilities such as searching, weather online, internet radio,etc., The toolbar includes a...
4
2392
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
1965
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 my mysql database using ajax since the server side code will have already been executed, how would i go about doing this, i have read on the xmlhttprequest function but im not sure if that is what i need, in the modal pop up i have two textboxes and...
1
4616
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 Database but I'm stuck in the EDIT. I'm getting 2 problems over here. Below is the description: 1)The FIRST page will list all the records from the table which Admin can EDIT with CHECKBOX for each record to select. He can select one or more than one...
0
10672
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9226
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7687
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5710
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4359
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3888
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.