Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 29th, 2008, 10:14 AM
Registered User
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabhash_singh11
Default <select> </select>

  i am having problem in bringing the values from javascript array to my select box.
 actually,i am having twelve select box.I want that when user select the values in the first eleven box,the values selected by the user must dynamically come into the last select box,and can give him the option of selecting one of those values that's in the last select box..

         Please help.

Old March 3rd, 2008, 12:48 AM
Friend of Wrox
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts


First off, seeing as your data is in a JavaScript array, this really isn't a PHP-related question; the DHTML forum would have probably been more appropriate...

Anyways, what I believe you want is known as dynamic selection boxes. A quick google search brought up this page, and there are others if you'd prefer a different solution. For instance, this one uses list boxes instead of drop-down select boxes.

Basically the concept is dynamically changing the contents of a <select> element using JavaScript, which is fired by the selection of one of the "higher-up" select boxes. I suggest you look around the web and find some code samples you like (i.e. the links I found) and work your existing arrays into the code. It shouldn't be too complicated to integrate your existing data once you have the actual DHTML part of the code in place, but of course once you get that far you can post here again if you need help :)

Old March 11th, 2008, 09:08 AM
Registered User
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabhash_singh11

Thanks for replying...

       still its undone.

Similar Threads
Thread Thread Starter Forum Replies Last Post
select="<b>" AlDugan XSLT 8 March 24th, 2006 02:01 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
HELP: XSL -> HTML <select selected=true> jedbartlett XSLT 4 October 7th, 2004 11:16 PM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.