No Child List
DD is not populating the Child list.
Page code and generated code files attached.
Thanks,
DD is not populating the Child list.
Page code and generated code files attached.
Thanks,
in the parent list, you have set the value to use the brand column, change it to use the brandID column instead.
In the wizard the options I'm presented are products for the Array source, select "brand" in form "WADAInsertForm" for the Source List (this field holds brandName from the products table) and select "product" in form "WADAInsertForm" (this field holds the proposed productName to be inserted into the products table. All fields are from the products table.
The products table field list is as follows:
id -- this is an autoincrementing field that serves as the primary key for the table
brandID -- this corresponds to the brandID field in the brands table
brandName -- this corresponds to the brandName field in the brands table
productName -- obviously . . .
I see where the parameters passed in the onChange statement include brand, not brandID. I presume this is picked up from the Source list. The brandID is not available as a var on the page anywhere. If I manually edit 'brand' to 'brandID' in the onChange statement there is still no Child list.
Where do I change the selection from 'brand' to 'brandID'??
Thanks --- I'm probably overthinking this or missing something simple. .
Mike
select the parent list in design view.
click the dynamic button in the property inspector.
you currently have the value set to use the brand column, set the value to use the brand ID column.
Thanks, Jason -- I was getting punchy yesterday. Got the dropdowns working.
Still have a small issue. The following is the script output from the dynamic array
<SCRIPT>
var WAJA = new Array();
WAJA[0] = new Array();
WAJA[0][0] = 'Nathan|WA|s';
WAJA[0][1] = new Array();
WAJA[0][1][0] = '1';
WAJA[0][1][1] = 'Ham';
WAJA[1] = new Array();
WAJA[1][0] = 'Field';
WAJA[1][1] = new Array();
WAJA[1][1][0] = '2';
WAJA[1][1][1] = 'Bologna';
WAJA[1][2] = new Array();
WAJA[1][2][0] = '3';
WAJA[1][2][1] = 'Hot Dogs';
WAJA[1][3] = new Array();
WAJA[1][3][0] = '4';
WAJA[1][3][1] = 'Test';
WAJA[1][4] = new Array();
WAJA[1][4][0] = '5';
WAJA[1][4][1] = 'Test';
WAJA[1][5] = new Array();
WAJA[1][5][0] = '6';
WAJA[1][5][1] = 'Test';
WAJA[1][6] = new Array();
WAJA[1][6][0] = '7';
WAJA[1][6][1] = 'Test';
WAJA[2] = new Array();
WAJA[2][0] = 'Nathan|WA|s';
WAJA[2][1] = new Array();
WAJA[2][1][0] = '8';
WAJA[2][1][1] = 'Hot Dogs';
var products_WAJA = WAJA;
WAJA = null;
</SCRIPT>
As you can see the ' in Nathan's doesn't output -- instead |WA| is in its place. I've tried setting the column data type as text, varchar, and tinyblob with no success. I need the ' in the name.
Any suggestions?
Mike
change:
echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
to:
echo "WAJA[".$n."][0] = '".$newmainid."';\n";
Hey Jason -- had to put out some other fires, but back to this now.
I've revised the tables per your replies in my Data Assist issue, and have the drop downs on this page populating correctly. My problem now is that the Insert behavior is inserting the brandId and prodId in the fields where it should be adding the productName and brandName.
Page code attached. . .
it is better (and a more correct way to design your database) to have the brandID and ProductID stored.
the brandName and productName are defined in the brand and product tables
they should not be redifined in this loc_locations_new table. by using the ID's instead, you are properly normalizing your data which the goal of a relational database.
to return the brandName and productName associated to the ID's stored in the loc_locations_new table, you would use a joined query.
see the following page for more details on join queries:
sql_join.asp
Agreed -- I'm now using joins for the dynamic table. Unfortunately I have "inherited" this database, and there is much in it already used by other page assets. The site seems to have been developed with some kind of framework I cannot identify, and I'm having to "engineer" some of the newer features to work alongside the existing site. So I have no option to normalize the existing tables -- loc_locations_new is one of them.
That said -- am I hosed? The brands and products tables (and the resulting dynamic table) are configured so that the Dynamic Dropdowns work. The content of the brand and product form fields are chosen to use for the insert -- why are the ids being inserted instead?
the ids are being inserted because that is what you have chosen to use for the values of the lists.
the values for the lists are using the IDs.
you could add hidden form elements to the page for the brand and product, and add onchange code to the select lists will populate the hidden form elements with the selected label, then use the hidden elements in the insert behavior, and example of the onchange code can be found here:
showpost.php?p=43895&postcount=2
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.