I would like to select an option in a pulldown, select a record in a mysql
database depending on the pulldown selection and then put the data from the
record in the textfields.
I can retrieve the pulldown value using javascript
I can open the database and select the record using php
how can i combine the 2 to within the onchange option of the pull down.
Any suggestions welcome because i am getting crazy with this
roy 3 2607
"R.G. Vervoort" <ro**********@r oyvervoort.nl> schrieb im Newsbeitrag
news:40******** *************@n ews.xs4all.nl.. . I would like to select an option in a pulldown, select a record in a mysql database depending on the pulldown selection and then put the data from
the record in the textfields.
I can retrieve the pulldown value using javascript
I can open the database and select the record using php
how can i combine the 2 to within the onchange option of the pull down.
Any suggestions welcome because i am getting crazy with this
As Javascript runs on the client and PHP/MySQL on the server you have the
following 2 possibilities:
1. After having choosen the pulldown value you submit the form and display
the page again with the value filled into the textfield by PHP.
2. If you don't want to submit the form you have to bring the database
entries to the client side: write the records from MySQL into a Javascript
array with PHP and then get them from there with Javascript.
HTH
Markus
If I understand properly, you want to use a <select></select> element to
select some given information from a database, but you want to do this
without reloading the page. The short answer is "it can't be done" Once the
page is loaded, it's all there, another HTTP request must be made to run
more processes. If you don't want to reload an entire page you could use an
Iframe/layer.
Hope this helped.
--
Jeremy Jacobs www.PiercedMedia.com
"Greater men require and desire greater Goals, greater Standards, and
greater Accountability"
"R.G. Vervoort" <ro**********@r oyvervoort.nl> wrote in message
news:40******** *************@n ews.xs4all.nl.. . I would like to select an option in a pulldown, select a record in a mysql database depending on the pulldown selection and then put the data from
the record in the textfields.
I can retrieve the pulldown value using javascript
I can open the database and select the record using php
how can i combine the 2 to within the onchange option of the pull down.
Any suggestions welcome because i am getting crazy with this
roy
R.G. Vervoort wrote: I would like to select an option in a pulldown, select a record in a mysql database depending on the pulldown selection and then put the data from the record in the textfields.
I can retrieve the pulldown value using javascript
I can open the database and select the record using php
how can i combine the 2 to within the onchange option of the pull down.
You cannot, unless you want to serve the database data along with the
document that contains the "select" element or (re)load the/a new document,
as Markus pointed out. Retrieval of server-side information requires a
(HTTP) request. If you know your target environment, you may want to use
XMLHTTPRequest. Ask Google (Groups).
Excessive crossposting like this without Followup-To is unwished in Usenet.
Especially comp.lang.java. javascript is IMO obsolete, Java != JavaScript.
Please learn how to post: <http://www.faqs.org/faqs/usenet/posting-rules/part1/>
F'up2 comp.lang.javas cript
PointedEars This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: cgplays.com |
last post by:
Are there any good places to look for asp.net modules for select
pulldowns? There is a select pulldown on a site i do partial
development on http://www.computergroupplays.com/fb-pres4.asp that has
a 2 dimensional select pulldown, where the third input box gets filled
with the items that match what a user selects in the 2nd pulldown. I
want to find a web control module, or perhaps a good tutorial , that
can do this.
Mucho thanks for any...
|
by: Mark R |
last post by:
I have one .asp page with a SELECT pulldown list on it and some INPUT
fields. When SUBMIT is clicked the form data is submitted to that same page
and validated. If INPUT fields are empty the asp code will insert a visual
indicator (e.g. *) to convey that the field must be filled in.
However, if the user has made a selection in the pulldown list and has left
an INPUT field empty, when the form reappears after validation, the pulldown
menu...
|
by: J. Muenchbourg |
last post by:
I have 3 select pulldown boxes where a user will select a year (either
2002 or 2001), a week (one thru 52), and a database (short data or long
data). But if a user selects a week that is less than 4, the 3rd select
pulldown will only show the choice of "short data", as they will not be
able to select "long data". Is it dynamically possible in javascript to
program a third pull down in this fashion?
thx
Muench
|
by: cgplays.com |
last post by:
I have a select-pulldown at http://computergroupplays.com/fb-pres2.asp
that changes the 3rd pulldown (Dbase) depending on what the user
enters in the 2nd (Wk). My associate wants the values inside the
select box to retain their values after hitting the Go-Submit button
when selecting the 3 choices- they want to see the values retained on
the next page when you look at the form. Below is the include file
used to generate the dynamic...
|
by: Oskar Wild |
last post by:
Hello,
how do I code it to display a select (pulldown) box only if the user
has selected a certain option in another pulldown box?
<select name=country>
<OPTION value="France" SELECTED>France
<OPTION value="Spain">Spain
<OPTION value="Portugal">Portugal
</select>
| |
by: R.G. Vervoort |
last post by:
I would like to select an option in a pulldown, select a record in a mysql
database depending on the pulldown selection and then put the data from the
record in the textfields.
I can retrieve the pulldown value using javascript
I can open the database and select the record using php
how can i combine the 2 to within the onchange option of the pull down.
|
by: eureka |
last post by:
Hi folks,
I am working on a webapplication using Jsp and JS.
On my main Jsp(Jsp1) I have a table which is created dynamically
inside a <divand contains all the backend-table's records as rows,
ie as many records in the MySql-table as many rows in my Html-
table(say T1).I am creating this dynamic table using a Jsp-scriptlet
and I have set a vertical scrollbar on the <divsuch that user can
see 5 rows of T1 at a time.Each row in T1 has a...
|
by: WiseG1rly |
last post by:
Hey everyone!
I am completley new and I will start off by saying that I am not a programmer - figuring out this search took so long! I am debugging now and would appreciate any help :)
Anyways, I am creating a website where I have a database of pet listings in california. Each record lists the Type of Listing (eg. dog grooming or vet) the the Area it is in (so state, county etc.), a Name, Description, and Address.
I created a search...
|
by: WiseG1rly |
last post by:
Hey everyone!
Still working on a site I posted for a while ago. Essentially I have a search function that is populated through by a database in mySQL and PHP. I need a few things to help the finishing touches on this...
I need to have a "select all" option in each pulldown menu that will select all rows, and pass them onto the next page so that they can still be selected. Hopefully this makes sense.
Here is the code for the first...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |