close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Followed the TUT but still can't get multiple updates to work!

Thread began 11/17/2009 9:17 am by Banksie | Last modified 2/24/2010 7:42 am by Banksie | 8216 views | 11 replies

Banksie

Possible cause / fault

OK, I've spent some time digging on this and have found that the DA Multiple Records (Insert, Delete, Update) seems to act strangely at my end. The Repeat Selection behavior inserted by the wizards seems to appear randomly and also to rename my designated button adding an incremented number - hence not action when the button is pressed.

Below I've copied the chunks of code generated by the wizards followed by the hand edited code that corrects the anomaly and which subsequently works as required.

Is this an error with my set-up (DW8, DA 2.0.6) or a bug?

Please advise soonest.

Wizard generated code:
<form id="del_MultiplesForm" name="del_MultiplesForm" method="post" action="">
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_rsCart2Printer){
?>
<table width="300">
<?php do { ?>
<tr>
<td><?php echo $row_rsCart2Printer['printerName']; ?></td>
<td><input type="hidden" name="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>" />
<input type="checkbox" name="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" id="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" value='<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>'/></td>
</tr>
<?php } while ($row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer)); ?>
<tr>
<td><input type="submit" name="btn_DeleteMultiples_<?php echo $RepeatSelectionCounter_1; ?>" id="btn_DeleteMultiples_<?php echo $RepeatSelectionCounter_1; ?>" value="Delete Selected" /></td>
<td>&nbsp;</td>
</tr>
</table>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td>No records match your request.</td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rsCart2Printer && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</form>


Hand edited / corrected code:
(Note the position of the RepeatSelectionCounter code and the name o the submit button - btn_DelMultiples)

<form id="del_MultiplesForm" name="del_MultiplesForm" method="post" action="">
<table width="300" class="dataTable">
<?php do { ?>
<tr>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_rsCart2Printer){
?>
<th><?php echo $row_rsCart2Printer['printerName']; ?></th>
<td><input type="hidden" name="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>" />
<input type="checkbox" name="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" id="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" value='<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>'/></td>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td>No records match your request.</td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rsCart2Printer && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</tr>
<?php } while ($row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer)); ?>
<tr>
<td><input type="submit" name="btn_DelMultiples" id="btn_DelMultiples" value="Delete Selected" /></td>
<td>&nbsp;</td>
</tr>
</table>
</form>

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