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

Help me with dynamic select box

Hello all,
I'm having trouble populating a select box as per the selection of
above select box.Its like level 2 select box depends on the value of
level 1 box. Both the boxes values come from a mysql database. I tried
to use AJAX, Jquery and JSON but I can send only string values I want
to send the id of the records (int) which are numbers please help.

GEshan

Jul 2 '07 #1
3 2736
On Jul 2, 7:53 am, geshan <ges...@gmail.comwrote:
Hello all,
I'm having trouble populating a select box as per the selection of
above select box.Its like level 2 select box depends on the value of
level 1 box. Both the boxes values come from a mysql database. I tried
to use AJAX, Jquery and JSON but I can send only string values I want
to send the id of the records (int) which are numbers please help.

GEshan
Then ask in either an Ajax newsgroup, a Javascript newsgroup, a Jquery
newsgroup, or a JSON newsgroup.

Jul 2 '07 #2
Viva,

on 07/02/2007 08:53 AM geshan said the following:
Hello all,
I'm having trouble populating a select box as per the selection of
above select box.Its like level 2 select box depends on the value of
level 1 box. Both the boxes values come from a mysql database. I tried
to use AJAX, Jquery and JSON but I can send only string values I want
to send the id of the records (int) which are numbers please help.
Take a look at this PHP forms class. It comes with a plug-in that can
link select inputs and even can dynamically retrieve a new set of option
from a MySQL database using AJAX to retrieve the options with your PHP
script.

Here you can see a demo:
http://www.meta-language.net/forms-e..._linked_select

Here you can see a tutorial video:
http://www.phpclasses.org/browse/vid...ed-select.html

You can download the forms class and all plug-ins here:
http://www.phpclasses.org/formsgeneration

--

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/
Jul 9 '07 #3
On Jul 2, 1:53 pm, geshan <ges...@gmail.comwrote:
Hello all,
I'm having trouble populating a select box as per the selection of
above select box.Its like level 2 select box depends on the value of
level 1 box.
Please give xAjax a try:

http://www.xajaxproject.org/

Setup is very simple and xAjax makes it as simple as this in your PHP
app:
>>>
$objResponse = new xajaxResponse();
$objResponse->addReplace("myDiv3","innerHTML","xajax","<strong> xajax</
strong>");
<<<

___
Stefan

Jul 9 '07 #4

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

Similar topics

8
by: Drew | last post by:
I am trying to build a small app that shows a Course Title from the database, then displays a dropdown full of categories for the user to choose one... I thought a loop would be the best way to...
0
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of...
8
by: Dip | last post by:
Hello Experts, Here is the code to flatten a PC hierarchy into a level based table. It works fine. SELECT t1.TASK_ID AS TASK_LV1, t2.TASK_ID AS TASK_LV2, t3.TASK_ID AS TASK_LV3, t4.TASK_ID AS...
2
by: cpptutor2000 | last post by:
Could some PHP guru please help me? I am creating a dynamic dropdown list using a code snippet(Section A) as below: Section A: $sql_query=mysql_query("SELECT DISTINCT semester, year from...
3
by: mcmahonb | last post by:
Hey people... I've been searching this forum for a few hours and even though this topic has been went over from many different angles; I cannot seem to figure out how to make things work on my...
0
by: mtsylvester | last post by:
Hi All, How do I add a List Box to a dynamic Details View. I want to replace the check boxes with list boxes. If I try to simply replace the check box with a list box it complains about not being...
7
by: sri | last post by:
My environment is DB2v9.1, Windows/AIX and I am trying to compile the stored proc below and I am getting an error, "ERROR SQL0104N An unexpected token "WITH" was found following "User_ID =...
0
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works...
2
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, If I open the Dynamic help window in VS, why it doesn't show anything when I move a mouse to a system class say, dictionary. it says "No links are available for the current select"....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: 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...

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.