close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Dynamic Dropdowns on Update Record Page

Thread began 4/08/2009 2:15 pm by jendanko336232 | Last modified 4/09/2009 12:43 pm by jendanko336232 | 7431 views | 8 replies

jendanko336232Beta Tester

Must be doing somthing wrong

It still does not work. Here is my code:

<body onload="WA_setSelectionsInChildList(MM_findObj('ProductCategoryID'),<?php echo $row_WADAProducts['ProductCategoryID']; ?>)">
<div id="outerWrapper">
<div id="header">
<h1><img src="../images/WDC_Logo_200.png" alt="Warehouse Discount Center Logo" width="200" height="92" /> <span class="style2">Administrator Control Panel</span></h1>
<hr />
</div>
<div id="topNavigation">
<?php require_once("../CSSMenuWriter/cssmw_admin/menu.php"); ?>
<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw_admin.intializeMenu('cssmw_admin'); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw_admin.intializeMenu('cssmw_admin'); }, true); }</script>
</div>
<div id="contentWrapper">
<div id="content">



<div class="WADAUpdateContainer">
<?php if ($totalRows_WADAProducts > 0) { // Show if recordset not empty ?>
<form action="Products_Update.php?ProductID=<?php echo(rawurlencode($row_WADAProducts['ProductID'])); ?>" method="post" enctype="multipart/form-data" name="WADAUpdateForm" id="WADAUpdateForm" >
<div class="WADAHeader">Update Record</div>
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="WADADataTable">
<tr>
<th class="WADADataTableHeader">Available Online:</th>
<td class="WADADataTableCell"><input <?php if (!(strcmp((isset($_GET['valid'])?ValidatedField("ProductsUpdate","ProductLive"):$row_WADAProducts['ProductLive']),1))) {echo "checked=\"checked\"";} ?> name="ProductLive" type="checkbox" id="ProductLive" value="1" />
(check to make this item avaiable for sale)</td>
</tr>
<tr>
<th class="WADADataTableHeader">Item Type:</th>
<td class="WADADataTableCell"><label>
<select name="SuperClass" id="SuperClass" onchange="WA_FilterAndPopulateSubList(ProductCategoryList_WAJA,MM_findObj('Class'),MM_findObj('ProductCategoryID'),0,0,false,': ')">
<option value="appliances" <?php if (!(strcmp("appliances", $row_WADAProducts['SuperClass']))) {echo "selected=\"selected\"";} ?>>Appliance Item</option>
<option value="plumbing" <?php if (!(strcmp("plumbing", $row_WADAProducts['SuperClass']))) {echo "selected=\"selected\"";} ?>>Plumbing Item</option>
</select>
</label>
<?php
if (ValidatedField("ProductsUpdate","ProductsUpdate")) {
if ((strpos((",".ValidatedField("ProductsUpdate","ProductsUpdate").","), "," . "5" . ",") !== false || "5" == "")) {
if (!(false)) {
?>
<span class="textfieldServerError">
Item type is required.</span>
<?php //WAFV_Conditional Products_Update.php ProductsUpdate(5:)
}
}
}?> </td>
</tr>
<tr>
<th class="WADADataTableHeader">Item Class:</th>
<td class="WADADataTableCell"><label>
<select name="Class" id="Class" onchange="WA_FilterAndPopulateSubList(ProductCategoryList_WAJA,MM_findObj('Class'),MM_findObj('ProductCategoryID'),0,0,false,': ')">
<?php
do {
?>
<option value="<?php echo $row_rsClass['Class']?>"<?php if (!(strcmp($row_rsClass['Class'], $row_WADAProducts['ClassId']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsClass['Class']?></option>
<?php
} while ($row_rsClass = mysql_fetch_assoc($rsClass));
$rows = mysql_num_rows($rsClass);
if($rows > 0) {
mysql_data_seek($rsClass, 0);
$row_rsClass = mysql_fetch_assoc($rsClass);
}
?>
</select>
</label>
<?php
if (ValidatedField("ProductsUpdate","ProductsUpdate")) {
if ((strpos((",".ValidatedField("ProductsUpdate","ProductsUpdate").","), "," . "12" . ",") !== false || "12" == "")) {
if (!(false)) {
?>
<span class="textfieldServerError">Item class is required.</span>
<?php //WAFV_Conditional Products_Update.php ProductsUpdate(12:)
}
}
}?></td>
</tr>
<tr>
<th class="WADADataTableHeader">Item Group:</th>
<td class="WADADataTableCell"><label>
<select name="ProductCategoryID" id="ProductCategoryID">
<?php
do {
?><option value="<?php echo $row_ProductCategoryList['CategoryID']?>"<?php if (!(strcmp($row_ProductCategoryList['CategoryID'], $row_WADAProducts['ProductCategoryID']))) {echo "selected=\"selected\"";} ?>><?php echo $row_ProductCategoryList['CategoryName']?></option>
<?php
} while ($row_ProductCategoryList = mysql_fetch_assoc($ProductCategoryList));
$rows = mysql_num_rows($ProductCategoryList);
if($rows > 0) {
mysql_data_seek($ProductCategoryList, 0);
$row_ProductCategoryList = mysql_fetch_assoc($ProductCategoryList);
}
?>
</select>
</label>
<input type="submit" name="defineCategories" id="defineCategories" value="Define..." />
<?php
if (ValidatedField("ProductsUpdate","ProductsUpdate")) {
if ((strpos((",".ValidatedField("ProductsUpdate","ProductsUpdate").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?><span class="textfieldServerError" id="ProductCategoryIDServerValidation">
Please select a category.
</span>
<?php //WAFV_Conditional Products_Update.php ProductsUpdate(1:)
}
}
}
?>
<?php echo $row_WADAProducts['ProductCategoryID']; ?></td>


The class ID is the parent list and the ProductCategoryID is the child list.

Thanks for your help.

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