HomeHome  
  • WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • FAQFAQ  
  • SearchSearch  
  • MemberlistMemberlist  
  • UsergroupsUsergroups  
  • RegisterRegister  
  • Log inLog in  
  • You are not connected. Please login or register


    Alert message before closing a new post form

    avatar
    • Administrator

        Reputation : 315
        Registered on : 2012-02-22
        Posts : 2362
        School of codes courses: coming soon
      Alert message before closing a new post form
      Hello members,

      Description


      Ask before closing a new post page

      Set up


      Very simple, just add this Javascript code in your javascript panel:
      Code:
      $(function() {
        var t = $("#text_editor_textarea");
        if(!t.length) {
          return
        }
        var empty = /^\s*$/.test(t.val());
        t.keydown(function(e) {
          if(empty && !/^\s*$/.test(t.val())) {
            $(window).bind("beforeunload", function() {
              return"Vous avez commenc\u00e9 \u00e0 \u00e9crire un message"
            });
            empty = false
          }else {
            if(!empty && /^\s*$/.test(t.val())) {
              $(window).unbind("beforeunload");
              empty = true
            }
          }
        });
        t.parents("form").submit(function() {
          $(window).unbind("beforeunload")
        })
      });


      Customize the tutorial


      Not available!

      Demostration




      Technical problems


      If you notice that the tutorial doesn't work for a browser or for a version of forum (PhpBB2, PhpBB3, PunBB, Invision) contact an administrator and we will fill this field with your segnalation.

      Thanks, the staff



      For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible...


      Friendly,
      The team of the Forum of Codes.



      Niko wants you in the team Guest

      Community manager and Administrator at Forumattivo.com

      avatar
      • Manager

          Reputation : 20
          Registered on : 2012-04-01
          Posts : 407
        Nice tutorial!



        avatar
        • ***


            Reputation : 0
            Registered on : 2012-03-26
            Posts : 49
          Thanks..!

          How to chnage this text?

          //This page is asking you to confirm that you want to leave - data you have entered may not be saved.//

          avatar
          • ***


              Reputation : 0
              Registered on : 2012-05-05
              Posts : 47
            1st My forum in your forum togheter

            avatar
            • Administrator

                Reputation : 315
                Registered on : 2012-02-22
                Posts : 2362
                School of codes courses: coming soon
              @fascicularia wrote: 1st My forum in your forum togheter
              What? I didn't understand :bene:



              Niko wants you in the team Guest

              Community manager and Administrator at Forumattivo.com

              avatar
              • ***


                  Reputation : 0
                  Registered on : 2012-05-05
                  Posts : 47
                The tutoriel arises from a request of help which I made...

                avatar
                • Administrator

                    Reputation : 315
                    Registered on : 2012-02-22
                    Posts : 2362
                    School of codes courses: coming soon
                  Yes :Good:
                  Everything is helpful...



                  Niko wants you in the team Guest

                  Community manager and Administrator at Forumattivo.com

                  avatar
                  • ***


                      Reputation : 0
                      Registered on : 2012-05-05
                      Posts : 47
                    It's true that the forums of mutual aid of FA are a gold mine to create tutoriels


                    YOUR BANNER HERE
                    728x90
                    DMCA.com Protection Status
                    © PunBB | Contact | Report an abuse