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

  • Home
  • SEARCH
  • 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 6565097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:03:02+00:00 2026-05-25T14:03:02+00:00

I have a .jsp page that users can enter information and then save it

  • 0

I have a .jsp page that users can enter information and then save it with a save button. The application works, but because the click event of the button is running Java code, which then adds the saved information to an Oracle db, it takes a few moments before the save is complete.

I need a way to show the users a wait cursor so they will know when the save is complete. However, I can’t figure out how the .jsp page will know when the Java code has completed.

Here is a snippet:

    function updateTrans() {
    document.body.style.cursor = 'wait';
    if (validateTrans()) {
      if(editform.cbFg.checked) {
        editform.Fg.value = "Y";
      }
      else {
        editform.Fg.value = "N";
      }
      editform.myaction.value = "updateTrans";
      editform.submit();
      document.body.style.cursor = 'default';
    }
  }

This does not work. I guess the editform.submit(); happens asynchronously.

Please help.

EDIT: The target of editform is a servlet.
EDIT: The servlet is a java page(HttpServlet), not a web page.

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

    Assuming the servlet that the form submits to is on the same domain as the parent page, you can output javascript:

    <script type="text/javascript">
        parent.document.body.style.cursor = 'default';`
    </script>
    

    from your servlet, to switch the cursor back to default when the servlet responds.

    Then you can just remove the line:

    document.body.style.cursor = 'default';
    

    From your current script, since you’ll let the servlet handle changing the cursor back.

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

Sidebar

Related Questions

I have a button on my .jsp page that I would like to act
Right now I have a JSP page that allows to sort some items, when
I'm using Spring Web Flow (v. 1.0.5) and I have a JSP page that
I have a functional JSP page that accepts URL parameters and updates a table
I have a JSP page which accepts SQL queries, performs them then returns the
I have HTML code in the jsp page that I want it to be
im using hibernate with my jsp page and mySQL ,how can i do that
I have a jsp page that is trying to reference some user defined classes.
I have an https jsp page that takes login values (username/password) and validates the
I have a jsp page. In the page i have got 3 radio button.

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.