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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:56:33+00:00 2026-06-03T05:56:33+00:00

Wondering why it doesn’t load on one click, but on two………………………………………………………..? <input id=btnPaymentAdd type=button

  • 0

Wondering why it doesn’t load on one click, but on two………………………………………………………..?

<input id="btnPaymentAdd" type="button" value="Add Payment Info" />
</p>
<div id="paymentSection"></div>
<br />    

....

$("#btnPaymentAdd").click(function () {
    $("#paymentSection").load('/Donation/AddPaymentInfo');
    $("#paymentSection").show('slow');
});

....

public ActionResult AddPaymentInfo()
{

    var vModel = new PaymentViewModel();
    vModel.Payment = new Payments();
    vModel.PaymentType = new WCCDentalApp.Models.PaymentType();

    ViewBag.PaymentTypes = new SelectList(dbEntities.PaymentTypes.OrderBy(pt => pt.PaymentTypeID),
    "PaymentTypeID", "PaymentType1", vModel.Payment.PaymentTypeID);

    return PartialView("PaymentPView", vModel);
}
  • 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-06-03T05:56:35+00:00Added an answer on June 3, 2026 at 5:56 am

    You need to bind your .show() function after the page loads…

    $("#btnPaymentAdd").click(function(){
        $("#paymentSection").load('/Donation/AddPaymentInfo', function(){
             $(this).show('slow');
        });
    });
    

    or you can use .get(), like this:

    $("#btnPaymentAdd").click(function(){
        $.get('/Donation/AddPaymentInfo', function(data){
             $("#paymentSection").html(data).show('slow');
        });
    });
    

    Otherwise, the way you have it will just do the .show() without waiting for the page to load, will make you think like clicking it twice works.

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

Sidebar

Related Questions

I'm wondering why this piece of code doesn't type-check: {-# LANGUAGE ScopedTypeVariables, Rank2Types, RankNTypes
SQLite doesn't have a data type for dates. I was wondering if it's enough
http://jsfiddle.net/YcK5X/ I'm wondering why this AJAX request doesn't return anything. $.ajax({ type: 'POST', url:
Wondering why the example below doesn't work? <a id=load_list href=#>Load the list</a> <ul></ul> <script
I'm wondering why my iPhone keyboard opened by a UITextField doesn't type anything except
I'm wondering if the following is possible. I know it doesn't work, but maybe
I am wondering why my webbrowser doesn't redirect to my html page. I have
I was wondering why shared_ptr doesn't have an implicit constructor. The fact it doesn't
I'm wondering why the following code doesn't work: String test = new String(new byte[]
I was wondering if anyone knew why jQuery doesn't have a simple $().id() method.

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.