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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:41:56+00:00 2026-06-12T20:41:56+00:00

I am debugging foreign complicated js code. There is button, when I press it,

  • 0

I am debugging foreign complicated js code. There is button, when I press it, page gets reloaded, but that shouldn’t happen. When I break inside click handler, it executes completely and page repload/refresh happens after it has finished. After I exit handler, I get into jquery depth. How can I track wich piece of code makes page reload? Thanx!

  • 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-12T20:41:57+00:00Added an answer on June 12, 2026 at 8:41 pm

    The problem was that the <button> declaration didn’t include the type attribute. Here’s what the HTML standard says about that:

    The type attribute controls the behavior of the button when it is
    activated. It is an enumerated attribute. The following table lists
    the keywords and states for the attribute — the keywords in the left
    column map to the states in the cell in the second column on the same
    row as the keyword.

    +---------+---------------+--------------------+
    | Keyword |     State     |  Brief description |
    +---------+---------------+--------------------+
    | submit  | Submit Button | Submits the form.  |
    | reset   | Reset Button  | Resets the form.   |
    | button  | Button        | Does nothing.      |
    +---------+---------------+--------------------+
    

    The missing value default is the Submit Button state.

    If the type attribute is in the Submit Button state, the element is
    specifically a submit button.

    A submit button’s default action is to submit the form to the server (thus reloading the page). To prevent that, you needed to either specify the type="button" attribute on your button, or prevent the default action in your click handler.

    JSFiddle showing all cases.

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

Sidebar

Related Questions

when debugging java code, in the stack trace, I noticed that something in the
Debugging assistance requested. The page http://www.freshfaves.com/newfave.html contains this code: <script> document.domain = 'freshfaves.com'; $(document).ready(function()
While debugging the code in Eclipse, I runned into the following problem. There is
Debugging with gdb, any c++ code that uses STL/boost is still a nightmare. Anyone
While debugging the code below, BroadcastReceiverCustom is being called but PhoneStateListenerCustom is not. For
Debugging a Firefox addon is a slow process: (1) edit source code in a
Debugging a PHP program, is there any add-on/plug-in for browser which I can view
While debugging and keep pressing F5, if the source code does not exist, eclipse
When debugging Java code using Eclipse, for collection variables, I saw the modcount member.
When debugging, I noticed there is a thread named Hashed wheel timer #1, what

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.