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

Dynamic Pick list question.

Hello,

I am wondering if someone could point me in the right direction to
figure out how to create a dynamic form. I have been developing
programs in perl and oracle and have recently switched to php.

I need to create a form that has four of five seperate pick list on it.

Each item in each of the pick list depend on the users previous entry.
For instence if the user picks Ford then Taurus, Ranger, Focus,.etc show
up in the next pick list then the user picks Ranger and 2 wheel drive, 4
wheel drive, etc show in the next pick list box on so on.

I know how to this if the screen is refresed after each user entry. What
I would like to fugure out how to make the screen automatically update
each pick list and not refreshing the whole screen.
Any help or instruction would be great!

Thanks

Mark
Feb 18 '06 #1
10 4932
Mark Winter wrote:
Hello,

I am wondering if someone could point me in the right direction to
figure out how to create a dynamic form. I have been developing
programs in perl and oracle and have recently switched to php.

I need to create a form that has four of five seperate pick list on it.
Each item in each of the pick list depend on the users previous entry.
For instence if the user picks Ford then Taurus, Ranger, Focus,.etc show
up in the next pick list then the user picks Ranger and 2 wheel drive, 4
wheel drive, etc show in the next pick list box on so on.

I know how to this if the screen is refresed after each user entry. What
I would like to fugure out how to make the screen automatically update
each pick list and not refreshing the whole screen.
Any help or instruction would be great!

Thanks

Mark


Mark,

You can't do this in PHP. PHP is client-side only; to do it without
refreshing would require all the info be sent to the client, then
processed by a client-side language such as javascript.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Feb 18 '06 #2
Right,

I know you have to use server side javascript, but how?...

Thanks

Mark

Mark,

You can't do this in PHP. PHP is client-side only; to do it without
refreshing would require all the info be sent to the client, then
processed by a client-side language such as javascript.

Feb 18 '06 #3
Mark Winter wrote:
Right,

I know you have to use server side javascript, but how?...

Thanks

Mark


Mark,

You can't do this in PHP. PHP is client-side only; to do it without
refreshing would require all the info be sent to the client, then
processed by a client-side language such as javascript.


No, javascript it client side. So you need to use something like PHP
for the server side processing, and javascript for the client side.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Feb 19 '06 #4
Jerry Stuckle wrote:
Mark Winter wrote:
Hello,

I am wondering if someone could point me in the right direction to
figure out how to create a dynamic form. I have been developing
programs in perl and oracle and have recently switched to php.

I need to create a form that has four of five seperate pick list on it.
Each item in each of the pick list depend on the users previous entry.
For instence if the user picks Ford then Taurus, Ranger, Focus,.etc
show up in the next pick list then the user picks Ranger and 2 wheel
drive, 4 wheel drive, etc show in the next pick list box on so on.

I know how to this if the screen is refresed after each user entry.
What I would like to fugure out how to make the screen automatically
update each pick list and not refreshing the whole screen.
Any help or instruction would be great!

Thanks

Mark

Mark,

You can't do this in PHP. PHP is client-side only; to do it without
refreshing would require all the info be sent to the client, then
processed by a client-side language such as javascript.


Minor correction: PHP is SERVER-side ONLY

Feb 19 '06 #5
noone wrote:
Jerry Stuckle wrote:
Mark Winter wrote:
Hello,

I am wondering if someone could point me in the right direction to
figure out how to create a dynamic form. I have been developing
programs in perl and oracle and have recently switched to php.

I need to create a form that has four of five seperate pick list on it.
Each item in each of the pick list depend on the users previous entry.
For instence if the user picks Ford then Taurus, Ranger, Focus,.etc
show up in the next pick list then the user picks Ranger and 2 wheel
drive, 4 wheel drive, etc show in the next pick list box on so on.

I know how to this if the screen is refresed after each user entry.
What I would like to fugure out how to make the screen automatically
update each pick list and not refreshing the whole screen.
Any help or instruction would be great!

Thanks

Mark


Mark,

You can't do this in PHP. PHP is client-side only; to do it without
refreshing would require all the info be sent to the client, then
processed by a client-side language such as javascript.

Minor correction: PHP is SERVER-side ONLY


Yep, sorry :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Feb 19 '06 #6
You can do this with AJAX.
http://developer.mozilla.org/en/docs...etting_Started

Feb 19 '06 #7
You could try it with javascript.
But you'd be talking about a quite large and complex javascript file.

I'd go with AJAX if I were you.

Feb 19 '06 #8
Thanks, it looks like what I want. I will try to implement it.
I might even learn something...
dbee wrote:
You could try it with javascript.
But you'd be talking about a quite large and complex javascript file.

I'd go with AJAX if I were you.

Feb 19 '06 #9
Hey Mark,

Let me know if you get this working. I've been wanting to add a similar
feature to my site. My alternative (and non-javascript version) will be
an ugly multi-page form.

Peace,
Jacob

Feb 19 '06 #10
Hello,

on 02/18/2006 05:48 PM Mark Winter said the following:
I am wondering if someone could point me in the right direction to
figure out how to create a dynamic form. I have been developing
programs in perl and oracle and have recently switched to php.

I need to create a form that has four of five seperate pick list on it.
Each item in each of the pick list depend on the users previous entry.
For instence if the user picks Ford then Taurus, Ranger, Focus,.etc show
up in the next pick list then the user picks Ranger and 2 wheel drive, 4
wheel drive, etc show in the next pick list box on so on.

I know how to this if the screen is refresed after each user entry. What
I would like to fugure out how to make the screen automatically update
each pick list and not refreshing the whole screen.


Take a look at this forms generation and validation class. It comes with
linked select plug-in class that does exactly what you want.

It lets you define select inputs with multiple groups of options that
are switched dynamically when the value of another input changes.

There is a static version of the plug-in that lets you define the
alternative groups as an array, and there are several variants of the
plug-in that picks the groups options from a database using different
API: MySQL or database independent with Metabase or PEAR::MDB2 API.

http://www.phpclasses.org/formsgeneration

Here is an example page:

http://www.phpclasses.org/browse/vie...lect_page.html

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Feb 20 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jonny Tango | last post by:
Hello everyone. Q. How do I create a dynamically-generated drop-down list for use in an array. I'm using PHP with a MySQL database (through phpMyAdmin) My database table is called...
5
by: Ralph | last post by:
Hi all, I'm a newbie to MS-SQL UDFs and seem to have a real big problem. I need to implement a logic to receive an adress build out of various user definable fields from various user defined...
19
by: Christian Fowler | last post by:
I have a VERY LARGE pile of geographic data that I am importing into a database (db of choice is postgres, though may hop to oracle if necessary). The data is strictly hierarchical - each node has...
8
by: Eyeawanda Pondicherry | last post by:
I have put some code together that creates an enum dynamically from some database values. The enum can be read perfectly by an application that references the dynamically generated dll. If I...
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
7
by: Mike Livenspargar | last post by:
We have an application converted from v1.1 Framework to v2.0. The executable references a class library which in turn has a web reference. The web reference 'URL Behavior' is set to dynamic. We...
19
by: Alex | last post by:
Hello list This question has probably already been asked, but let me ask again I have a mysql database to which I connect with my php scripts. The database contains articles. Name, Unit_Price...
0
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string...
5
by: Anil Gupte | last post by:
How does one access dynamic controls by name (or wahtever other means)? I have the following: Dim newbtnPick As New Button newbtnPick.Name = "SliceButton" & CurSliceNum newbtnPick.Location =...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
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,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.