PDA

View Full Version : Dynamic Dropdown will not work


armen252934
04-19-2010, 11:18 PM
I followed the getting started guide but can't get the dependent (child) menu to work. The child menu just sits there empty.

Any help will be greatly appreciated. I'm extremely frustrated with this extension.

I've attached the code to the page.

Jason Byrnes
04-20-2010, 06:45 AM
could you provide a link where I could see the page in a browser? Seeing the page in a browser will help me see what is going wrong.

armen252934
04-20-2010, 07:34 AM
http://173.83.45.83/manage/add-product.php

Jason Byrnes
04-20-2010, 07:46 AM
When I view source of your page, I do not see the script that should be created by the Create Dynamic Array behavior. the dynamic array for the child list is not being created.

This suggests that the there is either an error on the page, or the SQL for the recorsdset is not returning any results.

hre are a few things to try for troubleshooting:


1: add the following at line 1:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>


2 add this code after the body tag:
<?php
echo("Today is: ".date()."<br />");
echo("rsSub Total Rows: ".$totalRows_rsSub);
?>


this will write any php errors to the screen and tell us how many rows are being returned by the recordset that is used for the dynamic array.

armen252934
04-20-2010, 08:40 AM
As per your request, I've added the code to the page.

Jason Byrnes
04-20-2010, 08:49 AM
OK, now i see the dynamic array in the code, you can remove the debug code I had you add now.


In the souce, I see the following:

<!--function WA_ClientSideReplace(theval,findvar,repvar) {


change that to:

<!--
function WA_ClientSideReplace(theval,findvar,repvar) {


having them on the same line is causing the function to not be declared.

armen252934
04-20-2010, 09:00 AM
Made the changes... still nothing.

Jason Byrnes
04-20-2010, 09:17 AM
viewing the source, you have changed the end of the script which removed a couple of closing tags.


change:

if (targetselect.options.length > 0) {
targetselect.options[0].selected = true;
/* BEGIN Advanced HTML Editor */
var BaseURL = "../";
/* END Advanced HTML Editor */

to:

if (targetselect.options.length > 0) {
targetselect.options[0].selected = true;
}
}
/* BEGIN Advanced HTML Editor */
var BaseURL = "../";
/* END Advanced HTML Editor */

armen252934
04-20-2010, 09:20 AM
that seems to have done it, Thanks.