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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:29:09+00:00 2026-06-01T07:29:09+00:00

I have a aspx page and a js file, am accessing the js file

  • 0

I have a aspx page and a js file, am accessing the js file for some functions, say for example I have some autocomplete boxes in my aspx page and for that am accessing the js file for every autocomplete box, and finally when I click the save button, the saveFunction in my js file should be fired, for this I just made my Save button as simple html button as

<button type="button" onclick="saveRecords()">Save</button>

at the end of my aspx page am calling the js file as

<script type="text/javascript">
    $(document).ready(function () {
     pageInit();                    
    });       

and in the pageInit of my js file I refer my saveRecords function as

function pageInit() {    
saveRecords();

}

the problem here is whenever I run my application the saveRecords function is hitting first…..how can I avoid this, and call this function only when I hit Save button…can anyone help me here….

  • 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-01T07:29:10+00:00Added an answer on June 1, 2026 at 7:29 am

    If you don’t want to call saveRecords when the page initializes, you should remove the call to saveRecords in the pageInit function.

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

Sidebar

Related Questions

I have an aspx page that includes a javascript file in the head tag.
I'm modifying an .aspx page that uses some javascript to download a file based
I have a aspx page that has a UpdatePanel and a asp timer. the
I have a .aspx page that loads three separate .ascx controls to represent adding,
I have an aspx page that on a button click creates a BackgroundWorker and
I have an aspx page that, on a button click, creates an instance of
I have a .aspx page calling a .asmx page's web service. In that .net
I have configured my default page to be say abcd.aspx and is under ~/View//abcd.aspx
I have an aspx page that gets a list of documents available in a
I am exporting an aspx page as an xls (excel) file. I have everything

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.