PHP Classes

Multiple Cascase Drop Down boxes

Recommend this page to a friend!

      Cascade Drop Down  >  All threads  >  Multiple Cascase Drop Down boxes  >  (Un) Subscribe thread alerts  
Subject:Multiple Cascase Drop Down boxes
Summary:Additional code to create multiple cascading Drop Down boxes
Messages:5
Author:Joe Lalicata
Date:2009-04-30 09:28:16
Update:2012-08-23 03:05:02
 

  1. Multiple Cascase Drop Down boxes   Reply   Report abuse  
Picture of Joe Lalicata Joe Lalicata - 2009-04-30 09:28:17
Hello Gobinathm,

Great stuff by the way.

Unlike the other gentleman that posted a threat regarding cascading drop downs, I am a beginner. I am currently using NetObjects Fusion 11 to develop my site, since I initially did not want to learn and write my own code. However aside from outside support, support from the NetObjects staff is nearly abysmal and I have resorted to getting involved with PHP for its dynamic page capabilities and clean integration with MySQL.

How would I modify the code to add additional cascading drop down boxes? A perfect example of what I'm trying to do may be found at this site:

extron.com/download/driverfilter.as ...

First select a product, then you will see what I am asking about. Thanks in advance!

Regards,
Joe0855

  2. Re: Multiple Cascase Drop Down boxes   Reply   Report abuse  
Picture of Gobinath Mallaiyan Gobinath Mallaiyan - 2009-04-30 16:07:57 - In reply to message 1 from Joe Lalicata
the example show is refreshs the page are you looking for somehting like that

  3. Re: Multiple Cascase Drop Down boxes   Reply   Report abuse  
Picture of Joe Lalicata Joe Lalicata - 2009-05-01 02:29:25 - In reply to message 2 from Gobinath Mallaiyan
Thanks for the quick response.

I am fine with the refresh shown in the example I sent you, however I know you mentioned that your method benefits users so that they do not have to wait for the page to reload.

I prefer your method over the page refresh method, however if it will require more time and coding, I will be okay with the page refresh method.

Thanks again.

  4. Re: Multiple Cascase Drop Down boxes   Reply   Report abuse  
Picture of Joe Lalicata Joe Lalicata - 2009-07-01 03:46:41 - In reply to message 2 from Gobinath Mallaiyan
Hello Gobinath,

I have successfully generated the cascading drop down boxes (thanks to your code). But now how do I capture the selected items from each combo box as variables to pass back to a PHP server and perform a DB query?

I have been experimenting with Ajax (using jQuery), but I am not having luck capturing the data. Here's what I have:


<script language="javascript" type="text/javascript" src="scripts/jquery-1.3.2.min.js">
</script>
<script language="javascript" type="text/javascript">
var MyJavascriptVariable = document.getElementById('selectloc');

$(document).ready(function()
{
$.post("ajax.php", { js: MyJavascriptVariable});
});
</script>


Ajax.php attempts to store the posted value in a php session variable. Finally when the variable is recalled, I get the following message:
"This is a PHP Page. The javascript value is: [object HTMLSelectElement]"

[object HTMLSelectElement]<=======this is my problem. Any ideas? Thanks!!!

  5. Re: Multiple Cascase Drop Down boxes   Reply   Report abuse  
Picture of Julian Moreno Julian Moreno - 2012-08-23 03:05:02 - In reply to message 1 from Joe Lalicata
Hi:

The DEMO page was removed, so we can't see the DEMO.

COuld you fix it?

Best regards.