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 577541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:09:52+00:00 2026-05-13T14:09:52+00:00

The question that I am posting here is somewhat similar to question posted here

  • 0

The question that I am posting here is somewhat similar to question posted here but I am trying to set the properties upon the completion of ajax request.

The page displays all the feedbacks in ‘ul li’, each feedback has two voting elements ‘voteup’ and ‘votedown’

Now when the user clicks voteup element the vote is recorded using jquery’s ajax (i.e. vote function below)

The response text is populated in the ‘divProcessing’ div.

on the click of element voteup or votedown, I call the vote function as


vote('{$feedback.id},'voteup');

here is the code that I have written

function vote(action,feedbackId)
            {
                var $divEmail = $('#divProcessing');

                $.ajax({
                    type: 'get',
                    url: 'index.php?client='+$.getUrlVar('client')+'&page=ajax',
                    data: {option: 'vote', action: action, feedbackId: feedbackId},
                    dataType: 'html',
                    success: function(data,evt)
                    {
                        $divEmail.html(data)
                        .css({top:evt.pageY, left:evt.pageX})
                        .show();
                    },
                    beforeSend: function(){$divEmail.addClass('show_loading_in_center')},
                    complete: function(){$divEmail.removeClass('show_loading_in_center')}
                });
            }

Everything is working fine here but I need to show this ‘divProcessing’ near to the voting element being clicked (or near mouse position).

please help me show the divprocessing next to the img tag that is being clicked.

I hope I am able to explain my question clearly.

thanks

  • 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-13T14:09:53+00:00Added an answer on May 13, 2026 at 2:09 pm

    You might want to set the CSS position of the element to fixed. This will position the element relative to the screen, no matter where the element is defined and how scrolled the page is. This would be done by switching from:

    .css({top:evt.pageY, left:evt.pageX})
    

    To:

    .css({position:'fixed', top:evt.screenY, left:evt.screenX})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am aware that this is somewhat a re-post, but I feel like re-posting
I posted a question on the DOxygen forums and also am posting it here
After posting this question and reading that one I realized that it is very
Here's a question that's been haunting me for a year now. The root question
A very basic question it is but I wanted expert advice that is why
I'm trying to understand if it's possible to create a set of variables that
Update : It occurred to me after posting this question that the main downside
A question that has pondered me for the last while. I am primarily a
Simple question that keeps bugging me. Should I HTML encode user input right away
A question that occasionally arises is what is the best way to determine the

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.