close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Delete Popup Window

Thread began 5/20/2012 9:33 am by bill173836 | Last modified 5/24/2012 2:05 pm by bill173836 | 1475 views | 12 replies

Jason ByrnesWebAssist

the delete popup window is done using 2 divs that are set to display: none by default.

the first div is an overlay that shows the grey screen in the background, the second div contains the delete form which has a delete button and a hidden form element in it that is used to pass the ID of the record to delete.

the delete button in the results page uses an onClick event to change the ID of the hidden element, and change the display property of the 2 hidden divs:

for example, the delete button on a page i created for a users table looks like this:

onclick="document.getElementById('WADADeleteRecordID').value=<?php echo($row_WADAUsers['UserID']); ?>;document.getElementById('deleteBox').style.display = 'block';document.getElementById('deleteMessage').style.display = 'table';"

and the delete form that is created looks like this:

<div class="black_overlay" id="deleteBox"></div>

    <div class="messageContainer" id="deleteMessage">
        <div class="messageWrapper">
          <div class="messageContent">
            This will permanently remove the record from your database.<br/>
            This action cannot be undone.<br/><br/>
            <input type="submit" value="Delete" class="formButton unstyled" id="Delete" name="Delete" />
            <input type="button" value="Cancel" class="formButton unstyled" id="Cancel" name="Cancel" onclick="document.getElementById('deleteBox').style.display = 'none';document.getElementById('deleteMessage').style.display = 'none';"  />

the initial CSSS for the black_overlay and messageContainer classes uses display: none; to hide them till the delete button is clicked.

the css for the messageWrapper class should use absolute positioning and top: 50%; to position it in the middle of the 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





Ease of use


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