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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:38:10+00:00 2026-06-05T00:38:10+00:00

<a onclick=javascript:submitForm(‘save.htm’);> <span>Save</span></a> In the above code when i click on save I want

  • 0
<a  onclick="javascript:submitForm('save.htm');">
<span>Save</span></a>

In the above code when i click on save
I want to store the time taken by the save.htm action to to save all the inputs.
Kindly help.

  • 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-05T00:38:13+00:00Added an answer on June 5, 2026 at 12:38 am

    The code snippet that you provide shows that the code is invoked from the Javascript within the browser. The browser will submit the form.
    If you want to see how long it takes to process the save from the client perspective which include the submission time back and fro from the browser, you just need to add alerts that display the time.

    For debugging purpose, for example you can do this:

    <a  onclick="javascript:var start=new Date();submitForm('save.htm'); stop=new Date(); alert('start: ' + start + '\nstop: ' + stop);">
    <span>Save</span></a>
    

    You can create some fancy Javascript code to put the result in proper place instead of using alert dialog box.

    On the other hand, if you want to know what exactly it took to process at the server side, the one who should log is the “save.htm” page, which should print the starting and the stop time, and you can also calculate the difference between them.

    For example, the simplest (not recommended for production) would be adding this scriptlet into your JSP where save.htm is processing (assuming “save.htm” is a JSP, not a controller class):

    long start = System.currentTimeMillis();    
    // do the processing here
    process();
    saveHereAndThere();
    long stop = System.currentTimeMillis();    
    System.out.println("The processing took: " + (stop - start) + "milliseconds.");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the above code, I am appending a javascript onclick method to the image
when there is <a href=javascript:onclick:alert('hi')> click </a>. how come $('a').click(); doesn't make the alert
I have an array that I want to pass to a javascript onclick function.
I have the following code: <script type=text/javascript> function SubmitForm() { form1.submit(); } function ShowResponse()
I want to use javascript to display a hidden element on click, in each
just a quick question. I'm having a problem with divs with onclick javascript within
I am trying to replace the JavaScript onclick event handler in ASP.NET that is
JavaScript event onClick close window not firing after clicking and viewing PrettyPhoto image. HTML
AddEventHandler in JavaScript is for handling the events (like onclick ) universally (i.e. on
How do I load a javascript command (like an onload or onclick or something)

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.