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

Child list stays empty

Thread began 7/23/2010 8:51 am by biesheuvel378713 | Last modified 7/23/2010 12:19 pm by Jason Byrnes | 725 views | 5 replies |

biesheuvel378713

Child list stays empty

I've followed the tutorial (PDF) and constructed a page with to list menu. Now the dynamic array stays empty.

Copy from FireBug:

var WAJA = new Array();
3WAJA[0][] = new Array();
4WAJA[0][][0] = '';
5WAJA[0][][1] = '';
6WAJA[0][1] = new Array();
7WAJA[0][1][0] = '';
8WAJA[0][1][1] = '';
9WAJA[0][2] = new Array();
10WAJA[0][2][0] = '';
11WAJA[0][2][1] = '';
12WAJA[0][3] = new Array();
13WAJA[0][3][0] = '';
14WAJA[0][3][1] = '';
15WAJA[0][4] = new Array();
16WAJA[0][4][0] = '';
17WAJA[0][4][1] = '';
18WAJA[0][5] = new Array();
19WAJA[0][5][0] = '';
20WAJA[0][5][1] = '';
21WAJA[0][6] = new Array();
22WAJA[0][6][0] = '';
23WAJA[0][6][1] = '';
24WAJA[0][7] = new Array();
25WAJA[0][7][0] = '';
26WAJA[0][7][1] = '';
27WAJA[0][8] = new Array();
28WAJA[0][8][0] = '';
29WAJA[0][8][1] = '';
30WAJA[0][9] = new Array();
31WAJA[0][9][0] = '';
32WAJA[0][9][1] = '';
33var users_WAJA = WAJA;
34WAJA = null;

Is there something that I've done wrong? I checked the recordsets and they all contain data and also checked the database.

I use DW CS5 on a Vista machine..

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

Jason ByrnesWebAssist

your users query only returns the id, lastname and groupid

$query_users = "SELECT id,lastname,groupid FROM da_user ORDER BY lastname asc";


PHP is a cse sensitive language. in the code for the dynamic array, it is using the "groupId" column.

php:
$newmainid = $row_users["groupId"];



it should be a lower case i "groupid"

also, it is using the "ID" column instead of "id":

php:
echo "WAJA[".$n."][".$m."][0] = "."'".WA_DD_Replace($row_users["ID"])."'".";\n";



and the "Name" that is not returned by the recordset:

php:
echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_users["Name"])."'".";\n";
Sign in to reply to this post

biesheuvel378713

Thanks for the reply, i've started al over again and noticed the following:

I have a query like:

SELECT id, name, groupID from da_users ORDER BY name

Now if I open de dialog to create a dynamic ARRAY it changes id into ID and name into Name. After clicking ok it also writes ID and Name into the code.

When I adjust the code into name and id (lowercase) everything works fine. Even when reopening the dynamic array dialog it displays the record in lowercase as in the query.

I'm glad that i found it so I can pay attantion to it, it's just a litle bug in the dialog.

Thanks for helping me on my way, it's a great tool. I'm used to asp.net and now learning php so this sort of tools gets me on my way quickly!

Greetz,

Sign in to reply to this post

Jason ByrnesWebAssist

How are the columns named in the database? The Dynamic dropdowns extension just looks at what the name is in the database, not the name in the SQL statement.

SQL is not as case sensitive as PHP is.

So if the name in the database is ID
SELECT id will still work.

but the php code will need to use the SQL case, not the database case.

Sign in to reply to this post

biesheuvel378713

Okay, so the dialog allways looks at the naming convention of the database and not the query. Well at least I know now.

(Since I use this site for testing I didn't use the naming convention lowercase/uppercase that serious. Its best to write the query with the same naming convention as the database)

Thank you very much for your help!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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...