close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Dynamic drop Down with multiple insert

Thread began 12/08/2010 1:20 pm by CreateColl | Last modified 10/16/2011 7:54 am by CreateColl | 4709 views | 18 replies

Dave BuchholzBeta Tester

Jenny,

You missing some key elements,

The Multiple Insert/Update Repeat Code which should wrap your form fields

php:
<?php

// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining $RepeatSelectionCounter_1_Iterations;
while(
$RepeatSelectionCounter_1_IterationsRemaining--){
if(
$RepeatSelectionCounterBasedLooping_1 || $row_rsDataSet){
?>
...form fields go here
<?php
// RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td colspan="8">No records match your request.</td>
<?php // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!
$row_rsDataSet && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining 0;}
$row_rsDataSet mysql_fetch_assoc($rsDataSet);
}
$RepeatSelectionCounter_1++;
// RepeatSelectionCounter_1 End Loop
?>



your jQuery code should look like this based on your example and needs to be moved to just above the closing </body> tag so that it fires correctly:

php:
<script type="text/javascript">

// <![CDATA[
$(document).ready( function() {
// jQuery calls start here
// Calls should be made as parent/child
<?php    
for ($i 0$i < ($RepeatSelectionCounter_1); $i++) {
?>
makeSublist('parent_<?php echo $i?>','child_<?php echo $i?>', false, '');
makeSublist('child_<?php echo $i?>','baby_<?php echo $i?>', false, '');
<?php ?>
});
// ]]>
</script>



You select lists are missing the class that the script uses to identify the correct values

php:
<label for="parent">Parent Menu</label>

<select id="parent">
<option value"php code">dynamic menu php code goes here</option>
</select>

<label for="child">Child Menu</label>
<select id="child">
<option class="sub_<?php echo related parent id ?>" value="php code">dynamic menu php code goes here</option>
</select>

<label for="baby">Baby Menu</label>
<select id="baby">
<option class="sub_<?php echo related child id ?>" value="php code">dynamic menu php code goes here</option>
</select>



If you cannot make it work from these instructions I am happy to look at your actual page

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