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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:36:14+00:00 2026-05-24T21:36:14+00:00

i hard that it is always better to move all script at the bottom

  • 0

i hard that it is always better to move all script at the bottom of the page and as a result page load very fast. so today i did that and found a problem that when javascript files and my javascript function was loading then i click on a button which was attached with jquery function. the result i got page reload. which i don’t want. to avoid this situation we have 2 choice. one is let all script tag should be download first before other page content download and second one is just detect javascript file or script tag download in client side and functions are ready to call. if javascript files are downloading and function can be called then button click should call the righ js function other wise it will return false.

here is my code

if btnFeedback1 is clicked then a routine will be executed.

<script language="javascript" type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function () {
    jQuery("#btnFeedback1").click(function () {
        //here my logic goes
        return false;
    });
});

if associated js file are downloading then button click will return false not reload the page. so please guide me with code how to achieve it.

  • 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-24T21:36:15+00:00Added an answer on May 24, 2026 at 9:36 pm
    <input type="button" onclick="return false;" value="CLick button" id="btnFeedback1" />
    

    And javascript

    <script language="javascript" type="text/javascript">
    jQuery.noConflict();
    jQuery(document).ready(function () {
        $("#btnFeedback1").removeAttr('onclick');
        $("#btnFeedback1").click(function () {
            //here my logic goes
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is something that I always find a bit hard to explain to others:
This is really stumping me today. I'm sure its not that hard, but I
I always wondered: Are there any hard facts which would indicate that either shorter
I learnt the hard way that it is not possible to slipstream Visual Studio
I just learned (the hard way) that Java Component s can only have one
I've just learnt (the hard way) that databinding doesn't work with fields. This isn't
I know this shouldn't be that hard, but I couldn't find the answer on
I know it is a condition of hard links that they cannot span filesystems.
I have a binary field in my database that is hard to describe in
I want to modify a connection string that's hard-coded in a Java application (jar

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.