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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:32:08+00:00 2026-05-25T10:32:08+00:00

I know that using .submit will trigger an event when the submit button is

  • 0

I know that using .submit will trigger an event when the submit button is clicked. But I would like to trigger the event when the submit button have been clicked and the page reloaded (I think every page reloads after a form have been submitted).

This is an example:

    // Registration
$j("#register-form form").submit(function() {
          window.alert("submitted");
    $j("#registration-notification").animate({
            height: "21px",
            opacity: 1,
            'padding-top': "8px"
        }, 800 );
    return true;
});

    $j("#close-button").click( function() {
        $j("#registration-notification").animate({
          height: "0px",
          opacity: 0,
          'padding-top': "0px"
        }, 800 );
    });

with that code a notification appears, but the page immediately refreshes. What I want is to make the notification appear after the page refreshes).

Any suggestions to accomplish 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-25T10:32:08+00:00Added an answer on May 25, 2026 at 10:32 am

    Use a simple cookie to store when a page is submitted, and read that cookie on load and if it exists, show the notification and then delete the cookie.

    EDIT: Sample solution, using jQuery Cookie plugin:

    See the jsFiddle simple example here: http://jsfiddle.net/8952S/

    This is a simple example, adapt it to your needs.

    $(document).ready(function() {
        // check if user just submitted this page
        var justSubmitted = $.cookie('just_submitted');
        if (justSubmitted) {
            $("#registration-notification").show();
            // delete the cookie
            $.cookie('just_submitted', null);
        }
    
        // Registration
        $("form").submit(function() {
            // create a cookie, then let it submit normally
            $.cookie('just_submitted', 'true');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dynamically generated form that I would like to submit using Ajax.
I know that using SharePoint internally is free, but what if I create an
I know that using Dim currUser As String = Request.ServerVariables(LOGON_USER) returns the Domain\Username, but
I know that C# has the using keyword, but using disposes of the object
I know that I can share files using Shared Folders in Virtual PC, but
I need to have a click to edit element on a page, that will
I know that using continuous integration improves the quality of my code base, and
In PHP, I know that using parameterized queries is the best way to prevent
I know that just using rand() is predictable, if you know what you're doing,
I know that systems are using their own time zone databases at different levels.

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.