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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:48:39+00:00 2026-06-15T16:48:39+00:00

Page A: $(document).ready(function () { bindData(); }); function bindData() { $(‘#searchbtn’).bind(‘click’, function () {

  • 0

Page A:

$(document).ready(function () {
    bindData();
});

function bindData() {
    $('#searchbtn').bind('click', function () { SearchResult(); });
}
function SearchResult() {
 ajax call...
}

Page A HTML:

<input type="button" id="searchbtn" />

Page B Details—> this page comes after selecting a specific search result from page A search list

    <a href="javascript:history.back();">Back</a><br />

Now when I go back to the Page A I can see my search criteria’s as they were selected but the result Div is gone. What I am trying to do is I want the search list to stay when the Page comes back.
I think what I can do here is some how call the searchbtn click event again when the page comes back so the list will come-up again. Can anyone tell me how to fire the searchbtn click event only when the page comes back from Page B. or point me in the right way of doing this..
Thanks

  • 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-15T16:48:41+00:00Added an answer on June 15, 2026 at 4:48 pm
        function bindData() {
        var chkinput1 = $("input:checkbox[name=x]:checked").length;
        var chkinput2 = $("input:checkbox[name=y]:checked").length;
    
        if (chkinput1 > 0 && chkinput2 > 0) {
           SearchResult();
         }
        $('#searchbtn').bind('click', function () { SearchResult(); });
        }
    

    I know this is the worst way to achieve this result but I think instead of using any other plugins to add complexity we will go with this for now. If anyone else is looking for the same question let me tell you again this is not the best practice as on returning back to the history we are calling the search result again depending upon the cached input selection of checkboxes and generating the whole ajax call again to display the list. On the first request I am caching the list and setting sliding expiration so its not taking anytime to comeback and so everyone lives happily.

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

Sidebar

Related Questions

Aspx Page: $(document).ready(function() { $(#btnn).click(function() { $.ajax({ type: POST, url: TestPage.aspx/emp, data: {}, contentType:
Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
Say I have this code in my page: <script language=javascript> $(document).ready(function() { $(.test).click(function() {
Im using ajax to load a youtube video on the page load $(document).ready(function(){ $.ajax({
I am currently using this script to fade page transitions: $(document).ready(function() { $(window).bind(unload, function()
I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() {
Code Behind: [WebMethod] public static string emp() { return BlaBla; } Aspx Page: $(document).ready(function()
I use this script: $(document).ready(function() { $page = jQuery.url.attr(file); alert(page); }); but I get
i am adding collection of radio buttons to my page using jQuery below $(document).ready(function()
I have a jQuery tab, and this is my code: $(document).ready(function() { //When page

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.