Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6573013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:04:42+00:00 2026-05-25T15:04:42+00:00

I have a listview that outputs as a table. Inside of each <td> I

  • 0

I have a listview that outputs as a table. Inside of each <td> I have a <div> which contains a <hidden> element.

When a sibling of that element is clicked I have it read the hidden value of the hidden element with jquery.prev().

It does the first element fine, but when I click on another element it appends the first element i click orginally. Right now i am testing so i have a alert call the variable for testing and I get two alerts with the value of the hidden element the first one i clicked and now the second. this var continues to build. how do I just have prev get that one value?

Here is my markup:

          <div id="HypeShareAlbum" style="padding: 0;margin:0">
              <input type="hidden" value="<%#Eval("ID") %>"/>
              <asp:HyperLink runat="server" Text="Share Album"></asp:HyperLink>
          </div>

And my corresponding client code:

 $('#HypeShareAlbum a').click(function () {
            //Create/clear variiable for albumID
            var albumvalue = '';
            //Set Variable for albumid
            albumvalue = $(this).prev().val();
            //Dialog Settings
            var dialogsettings = {
                width: 447,
                minheight: 100,
                height: 356,
                position: ["center"],
                close: function () {
                    $('#ClonedEmail').html('');
                }
            };
            //DIALOG FOR SHARING ALBUM STARTS HERE
            //Show Share Album Dialog
            $('#ShareDialog').dialog(dialogsettings);
            //When Focusing out of main email check if exist
            $('#addemail input[type=text]').focusout(function () {
                //Checks main email
            });
            //Click Event for Adding more Emails to dialog
            $('#AddMoreEmails').click(function () {
                //Append Email
                $('#addemail').clone().appendTo($('#ClonedEmail'));
                //Remove and bind back fousout event
                $('#ClonedEmail input[type=text]').unbind('focusout');
                $('#ClonedEmail input[type=text]').focusout(function () {
                    //Check email and let user no if email is found or not
                });
            });
            //Cancel Dialog
            $('#CancelEmailShare').click(function () {
                $("#ShareDialog").dialog("close");
            });
            //Send Email Ajax and Cancel Dialog
            $('#SendEmailShare').click(function () {
                alert(albumvalue);
            });
            //DIALOG FOR SHARING ALBUM ENDS HERE
        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:04:42+00:00Added an answer on May 25, 2026 at 3:04 pm

    instead of adding this value to a alert, i added it to a textbox for testing and it worked fine. Not sure why on a alert it was coming up multiple times but, its now working ok.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView that creates a table. Each row in the table has
I have a ListView that contains 1 image+2 texts + 1 image on a
I have an Arraylist of HashMap . Each HashMap element contains two columns: column
I have a listview that has multiple entries and each entry has 2 subitems.
I have a ListView that presents items horizontally. Each Item is a 1 column
I have a listview that is binded to a ThreadSafeObservableCollection. The background of each
I have a ListView that displays comments for an article. Each comments has a
I have a ListView that is fed by an SQLiteDB. On each row returned,
I have ListView that has the following EditItemTemplate: <EditItemTemplate> <tr style=> <td> <asp:LinkButton ID=UpdateButton
I have ListView that uses a GridView to display several columns of data. Two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.