locked
page is resetting value RRS feed

  • Question

  • User-1767698477 posted

    I have another post on this, but I thought I'd create another since this is a different issue.

    I'm getting acquainted with debugging, but I don't understand the behavoir after the button click I have added to add up the total column text boxes. This is the Calculate button at the bottom of the page.  So far, I have it coded to only add up the first few totals from the 100+  textboxes which have to be coded. I added a button at the bottom and created a separate script section for the function totalcharges() {

    I did this because before the page was taking too long to load the total numbers which are calculated amounts as opposed to stored in the database amounts. It was taking about 15 seconds just to load those total columns and THEN it had to add those and slot the total in at the bottom of the page.  It is working much more quickly now, and it is calculating the total right for the first several checkboxes, but why does it reset the page and then remove the total charges number at the bottom of the page? It was there for a second, and in the blink of an eye it dissapeared!

    You can see this by logging in at http://www.mortgageloanapply.com/login.aspx

    credentials are johndoe and Johndoe1@

    Sunday, July 26, 2020 5:18 AM

Answers

  • User-943250815 posted

    The "reset" value effect you see, is in fact due to "Calculate" button postback right after execute Javascript function "totalcharges()"
    On button use "OnClientClick = totalcharges(); retun false;" to prevent postback on button click

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, July 26, 2020 3:26 PM

All replies

  • User-943250815 posted

    The "reset" value effect you see, is in fact due to "Calculate" button postback right after execute Javascript function "totalcharges()"
    On button use "OnClientClick = totalcharges(); retun false;" to prevent postback on button click

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, July 26, 2020 3:26 PM
  • User-1767698477 posted

    Yes, that did the trick. Thanks JZero.

    Sunday, July 26, 2020 4:19 PM