close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

3 DDs, last one getting value for 2nd one, not 3rd one

Thread began 5/24/2010 5:02 pm by max279608 | Last modified 5/25/2010 2:52 pm by max279608 | 1098 views | 8 replies |

max279608

3 DDs, last one getting value for 2nd one, not 3rd one

I am using Dreamweaver CS3. I have a 3 dropdown menues and 3 recordsets for auto parts. Second DD gets populated with models when I click on the first DD holding the makes. But the third recieves the value in the 2nd DD, not the recordset for the 3 DD when I click on the 2nd DD with models...

My recordsets are as follows.

rsParent = select all the makes
rsChild = select all the models from the selected make from rsParent
rsTarget = select the years for the model selected in rsChild, but it only populates the 3 DD with models, not years

The rsTarget displays the data I want in the recordset in testing. I think it has to do with the runtime value I am giving it in Dreamweaver...? Sorry been working on this for days, tired and going in cirlces.

I am including my php file with the DD's.

Any help is really appreciated, I am whooped.

Thanks!!!!

Attached Files
DDphp.ZIP
Sign in to reply to this post

Jason ByrnesWebAssist

In the populate List From Array behavior that is applied to the Parent list, you are using the rsChild Dynamic Array (rsChild_WAJA):

<select name="parent" size="10" onchange="WA_FilterAndPopulateSubList(rsChild_WAJA,MM_findObj('parent'),MM_findObj('child'),0,0,false,': ')">





Again, you use that same dynamic array in the Populate List from Array behavior that is applied to the Child List (rsChild_WAJA):

<select name="child" size="10" onchange="WA_FilterAndPopulateSubList(rsChild_WAJA,MM_findObj('child'),MM_findObj('target'),0,0,false,': ')">




to use the rsGchild array, that code should be:

<select name="child" size="10" onchange="WA_FilterAndPopulateSubList(rsGchild_WAJA,MM_findObj('child'),MM_findObj('target'),0,0,false,': ')">
Sign in to reply to this post

max279608

I think it is in how I am passing the runtime value

I made the change to rsGchild, which makes sense. But now it passes nothing. I think now it is in my value I am trying to pass to the rsGchild... This is what I have:

$models_rsGchild = "EL";
if (isset($rsChild)) {
$models_rsGchild = $rsChild;
}
mysql_select_db($database_connTravis, $connTravis);
$query_rsGchild = sprintf("SELECT cars.From_dt, cars.To_dt FROM cars WHERE cars.Model = %s ORDER BY cars.From_dt", GetSQLValueString($models_rsGchild, "text"));

I am not sure what to put as runtime value. I want what is selected in the child list. I used $rsChild...? should it be something like $_POST['child'] ?

Sign in to reply to this post

Jason ByrnesWebAssist

No, you shouldn't filter the recordset at all, that will be done using client side javascript when the select list is changed.

Sign in to reply to this post

max279608

Still not working

I have attached my table and the file. This is what I am trying to do for an auto parts store. This is their data I have to work from.

First select list populate with makes (make is distinct in recordset)
Second select list populated with models (model is distinct in recordset)
Third select list is populated with the from and to list of the model selected. (year needs selected make to select year info)

I get First and Second list to populate, not third.

I really appreciate your help. I just can't get it to work. THANK YOU

Attached Files
DD.zip
Sign in to reply to this post

Jason ByrnesWebAssist

Couple of problems:
1) the rsGchild only returns the date columns:

SELECT cars.From_dt, cars.To_dt
FROM cars
ORDER BY cars.From_dt



it needs to return the model column as well:
SELECT cars.Model, cars.From_dt, cars.To_dt
FROM cars
ORDER BY cars.From_dt


2) In the Create Dynamic Array(rsChild), the Child ID is bound to the Make column, it should be set to the model Column instead.

Sign in to reply to this post

max279608

display the two dates in list

Hi Jason,

That worked. I have one last issue. I am trying to display both the from and to date in the select list.

I added the to date into the array, then added it into the list and it only shows the from date? Any idea what I am doing wrong?

I can not express how helpful you have been. Is there a place I can also post how great the support team has been? You guys are AWESOME!!

I attached and commented the two changes I made. Again, thank you!

The purchase of DD extention was well worth it!!!

Attached Files
DD.zip
Sign in to reply to this post

Jason ByrnesWebAssist

use the CONCAT function in the SQL for rsGchild recordset.

SELECT cars.Model, CONCAT(cars.From_dt, '-', cars.To_dt) as FromToDate
FROM cars
ORDER BY cars.From_dt

the FromToDate column wont be availabel for selection in the Create Dynamic Array wizard, but you can change:
echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_rsGchild["From_dt"])."'".";\n";

to:
echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_rsGchild["FromToDate"])."'".";\n";

Sign in to reply to this post

max279608

Thank you!

Again, you have really helped. It works now. Anyone concidering buying this product. the timely support is unheard of with other products!

Thanks!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...