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

DataAssist not deleting the correct record from a repeating region

Thread began 9/13/2014 8:46 am by acaciasd344844 | Last modified 9/19/2014 11:19 am by acaciasd344844 | 749 views | 5 replies

acaciasd344844

Hi Jason,

I gave the button code another go but yet again its doing the same thing, deleting the last record in a list rather than the one selected. I followed your instructions by adding the following code

<input name="deleteID" type="hidden" id="deleteID" value="<?php echo $row_Recordsetfindallprodid['purchaseid']; ?>">
<input name="deleteproduct" type="submit" class="custom_button_red" id="deleteproduct" value="-" onClick="document.getElementById('deleteID').value=<?php echo $row_Recordsetfindallprodid['purchaseid']; ?>">

then amending the server behavior to point at the deleteID hiden element as shown below

<?php echo((isset($_POST["deleteID"]))?$_POST["deleteID"]:"") ?>

As I say I have tried numerous other attempts, but to no avail. It will not select the correct record id for deletion. I have tried it with hidden elements and text fields. I'm beginning to think it may be down to the MySQL code that is attached to the repeat region.

I did try something I created a temporary field and pointed it at the purchase recordid, then i created a simple link 'testlink' and pointed that at the same page and the temporary field. similar to the following.

page_4.php?tmp=<?php echo((isset($_POST["tmp"]))?$_POST["tmp"]:"") ?>

When hovering the mouse over the link, their is no value visible.

page_4.php?tmp=

So if no value is being sent to the server, I guess the delete behavior is just deleting the last record in the database table. I have had issues with the isset($_POST function before, so could that be the culprit, it is posting even though the variable is empty.

I'm not sure Jason, I'm no php developer at all

Thanks again

John

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