close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

delete image

Thread began 3/04/2013 4:41 am by JamieEff | Last modified 3/11/2013 1:07 pm by Jason Byrnes | 4874 views | 34 replies |

JamieEff

delete image

Hey guys

Just wondering how I would get an _update.php page to allow for a file that had been added from the _insert.php page to be removed/deleted from the database?

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

add a new form to the page to be used for deleting the image.

in the form you nee a hidden element and a submit button.

set the value of the hidden element to use the file name column from the recordset that populates the update page.

add the delete file behavior, and use the hidden element for the file name, set the trigger to the delete file form button being pressed

Sign in to reply to this post

JamieEff

sorry if this ia a bit obvious Jason but does the submit button remain visible and is that how the user would delete the image by clicking on that?

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is correct.

Sign in to reply to this post

JamieEff

thanks. can the 2nd form be nested within the original form?

Sign in to reply to this post

Jason ByrnesWebAssist

no, you cannot nest forms.

Sign in to reply to this post

JamieEff

thanks Jason.

So am assuming that I can position the delete button by an element of the original form but i would need to use relative/absolute positioning to 'put' it there?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, that is correct.

Sign in to reply to this post

JamieEff

think I am getting a little muddled on the form and delete aspect itself.

Have set the form up with the hidden element and the delete button... just not sure what I should be putting as the action?

html:
<form action="" method="post">
<input name="Image1" type="hidden" value="<?php echo $row_WADAwebsites['Image1']; ?>" />
<input name="Delete" type="button" value="Delete Image" /></form>



Image1 is the row to be deleted


In the delete record, I cannot see the delete button in the drop down for the trigger.

In the lookup, do I select key column to be Image1 or the primary key as set in the dbase?

Then in the value, am assuming that you click the dynamic button and select Image1 from the recordset?

Sign in to reply to this post

Jason ByrnesWebAssist

the delete button input type needs to be set to submit instead of button.

for the lookup column, you select the image1

for the look up value, you click the lightning bolt icon and select the hidden form element.

Sign in to reply to this post
loading

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