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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:06:59+00:00 2026-05-26T14:06:59+00:00

<script type=text/javascript> function pageLoad() { var $scrollingDiv = $(#scrollfix); $(window).scroll(function () { if ($(window).scrollTop()

  • 0
<script type="text/javascript">
    function pageLoad() {
        var $scrollingDiv = $("#scrollfix");
        $(window).scroll(function () {
            if ($(window).scrollTop() == $(document).height() - $(window).height()) {
                __doPostBack('<%= GetMoreResults.UniqueID %>', '');
            }
            $scrollingDiv
                .stop()
                .animate({ "marginTop": ($(window).scrollTop()) + -60 + "px" }, "slow");
        });
    }
</script>

This code does not execute at all, the reason i’m using the pageLoad function is because the jquery code failed to execute after updatepanel partial postback.
But then after using this one, none of the code above works even on first page startup.

However, the code that USED to work on page load is below but the jquery part STOPPED working after postback:

$(document).ready(function () {
    $().ready(function () {
        var $scrollingDiv = $("#scrollfix");
        $(window).scroll(function () {
            if ($(window).scrollTop() == $(document).height() - $(window).height()) {
                __doPostBack('<%= GetMoreResults.UniqueID %>', '');
            }
            $scrollingDiv
            .stop()
            .animate({ "marginTop": ($(window).scrollTop()) + -60 + "px" }, "slow");
        });
    });
});

Solutions? Thanks alot.

UPDATE #2

This is my current code:
It works the first time the page loads, but not after the partial postback trigger by the __doPostBack.

<script type="text/javascript">
        window.load = pageLoad();
            function pageLoad() { 
                var $scrollingDiv = $("#scrollfix"); 
                $(window).scroll(function () { 
                    if ($(window).scrollTop() == $(document).height() - $(window).height()) { 
                        __doPostBack('<%= GetMoreResults.UniqueID %>', ''); 
                    } 
                    $scrollingDiv 
                    .stop() 
                    .animate({ "marginTop": eval($(window).scrollTop()) + -60 + "px" }, "slow"); 
                }); 
            } 
</script>

UPDATE #3

I should mention that this page does not inherit from Page, I’ve made a custom page class called BasePage : Page.

Maybe pageLoad() does not fire for some reason related to this?

  • 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-26T14:07:00+00:00Added an answer on May 26, 2026 at 2:07 pm

    Try using .bind() with your pageLoad:

    pageLoad:

    It is also called after every partial postback. It basically functions
    as a combination of Application.Init and
    PageRequestManager.EndRequest.

       function pageLoad() {
            var $scrollingDiv = $("#scrollfix");
            $(window).bind('scroll', function() {
                if ($(window).scrollTop() == $(document).height() - $(window).height()) {
                __doPostBack('<%= GetMoreResults.UniqueID %>', '');
                }
                $scrollingDiv
                .stop()
                .animate({ "marginTop": ($(window).scrollTop()) + -60 + "px" }, "slow");
            });
        }
    

    $(document).ready() and pageLoad() are not the same!

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

Sidebar

Related Questions

Look this code: <script type = text/javascript> function mouseClick (container) { container.appendChild (document.createTextNode (Can
I'm using this code: <script type='text/javascript'> $(document).ready(function () { //Check if url hash value
<script type=text/javascript> function testing() { $.ajax({ type: POST, url: testing.php, data: call=+$(#abc).val(), success: function(msg){
Can someone show me whats wrong with this: <html> <script type = text/javascript> function
This my javascript :- <script type =text/javascript> $(function() { $(#tabs).tabs({ cache: true ,fx: {
I have a javascript as <script type=text/JavaScript> function CalculateDistance (plat1, plon1, plat2, plon2) {
I have the following code: JS <script type=text/javascript> $(function(){ $('#fgotpwfield').hide(); $('#login_submit').click(function() { $('#form_result').fadeOut('fast'); $('#myccrxlogin
look at this code, <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <script> function change() {
I would like to add this code: <script type=text/javascript src=http://www.formstack.com/forms/js.php?1134414-uqmj2UXxEw-v2> </script> <noscript> <a href=http://www.formstack.com/forms/CampusEnterprises-chopped_greens_order_form__copy
I have a jQuery script: $.ajax({ url: /scripts/secure/development/ajax.asp, type: POST, dataType: text, data: cmd=addresses,

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.