Solved

Photoalbum using ListView and Lightbox jquery plugin

Posted on 2010-11-08
6
487 Views
Last Modified: 2012-05-10
http://aspdotnetcodebook.blogspot.com/2010/06/photoalbum-using-listview-and-lightbox.html

I need to insert a delete link

   <%-- <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Delete" Text="Delete" />--%>
0
Comment
Question by:omegalove
  • 3
  • 3
6 Comments
 
LVL 17

Accepted Solution

by:
Shinesh Premrajan earned 500 total points
ID: 34090275
<script type="text/javascript">
        $(function() {
             $('#images  a').lightBox({ fixedNavigation: true });
             $('#images  a').append('<img src="images/cross.gif" onclick="callremove('+this+')" class="deleteimage" />");

        });
    </script>

You can use the jquery to add the delete cross image over the image. And onclick of the image you will have the callremove function been called.function callremove(obj) will need to be written to clear the image from the album.This can be done with the getelementbyid tag.

Hope this helps
0
 

Author Comment

by:omegalove
ID: 34090327
<script type="text/javascript">
       <script type="text/javascript">
        $(function() {
             $('#images  a').lightBox({ fixedNavigation: true });
             $('#images  a').append('<img src="images/cross.gif" onclick="callremove('+this+')" class="deleteimage" />");

        });
    </script>

It opens the image up?
0
 
LVL 17

Assisted Solution

by:Shinesh Premrajan
Shinesh Premrajan earned 500 total points
ID: 34090521
http://www.balupton.com/sandbox/jquery-lightbox/demo/

Hope this jquery site will resolve your issues
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:omegalove
ID: 34090824
still confused.
0
 
LVL 17

Assisted Solution

by:Shinesh Premrajan
Shinesh Premrajan earned 500 total points
ID: 34090850
ok fine, Did u defined the function callremove(). If there is any screenshot then it will give more idea to resolve the issue.

if the function callremove() is not defined then define like this
function callremove(obj){

alert("Selected object is :"+obj.value);

}

Hope this helps
0
 

Author Closing Comment

by:omegalove
ID: 34095338
<script type="text/javascript">
       $(function () {
           $("a.lightbox").lightBox();
           });
  </script>
the problem was the css was being wrapped around the listview


                                                       
This did the job.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question