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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:45:12+00:00 2026-05-25T12:45:12+00:00

I am calling page getUserAdDetails.aspx?PID= inside a master page using jQuery. I have to

  • 0

I am calling page getUserAdDetails.aspx?PID= inside a master page using jQuery.
I have to generate the id for button dynamically … Code below works fine but it does not work on single click rather i have to double click the button to load the external page.. I am new to jQuery so i find it difficult to find a solution. Please check my code and would appreciate if some one can fix it..

If i also try to fire the same even on a link rather than button then it does not work..
Please see the code below this will give you an idea

<script type="text/javascript">
    function passPID(pid, psno) {
        $(document).ready(function () {
            $('#' + psno).html('<img src="images/ajax-loader-small.gif"/> Loading...');
            $('#' + pid).click(function () {
                    $('#' + psno).load("getUserAdDetails.aspx?PID=" + pid);
            });
        });
    }
</script>

<input id='<%# Eval("ProductIDGUID")%>'  type="button" value="View Details" onclick="passPID('<%# Eval("ProductIDGUID")%>', '<%# Eval("psno")%>' )" class="btncss" />
  • 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-25T12:45:12+00:00Added an answer on May 25, 2026 at 12:45 pm

    Change the script to:

    function passPID(pid, psno) {
        $('#' + psno)
            .html('<img src="images/ajax-loader-small.gif"/> Loading...')
            .load("getUserAdDetails.aspx?PID=" + pid);
    }
    

    It was working with double click, because when you were clicking the first time, inside your function you were attaching a click event listener to that element. Then, when you were clicking for the second time, this handler was being executed.


    Here is a solution with $.slideUp and $.slideDown animations:

    function passPID(pid, psno) {
        var $psno = $('#' + psno);
        $psno.html('<img src="images/ajax-loader-small.gif"/> Loading...');
        $.get('getUserAdDetails.aspx?PID=' + pid, {} , function(html){
            $psno.slideUp(100, function(){
                $psno
                    .html(html)
                    .slideDown();
            })
        }, 'html');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using asp.net with url rewrite . Inside Page Load I have the following
I have a .aspx page calling a .asmx page's web service. In that .net
I have a web project that has a page called editemployee.aspx. The code behind
I have a heavy traffic aspx page calling a web service upon every user`s
I need a way of calling a web page from inside my .net appliction.
I have a number of iframes calling a function in my main page. Is
I have an ASP.NET page with a jQuery dialog that is displayed to change
Q: I have an iframe calling page X, on page X is a div
I have page and call method inside my page. I want to add some
When calling page methods or web services with either jquery or MSAjax, the Session

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.