Hi,
I have any form for tell friends ! How To show Div After Click (tell friend) link and hide div after onsubmit form ? ( using Jquery or java script)
Example :
TELL FRIENDS CLICK LINK
<div id="formhide"></div> (default is hidden).
After Click Show Loading Message and show form for send data to any email . so if Form is valid Show loading message and message Success ! so hide dive ( to default)

DMEO: http://www.makaan.com/ ( please search any . . . ) after search click in send email & sms button . you see . . . .

Thanks

    Using jQuery it would look something like this:

    The link:

    <a href="javascript:;" onclick="$('#formhide').show();">Tell a Friend</a>

    The form:

    <form action="yourScript.php" method="post" onsubmit="$('#formhide').hide();">
      anakadote;10967978 wrote:

      Using jQuery it would look something like this:

      The link:

      <a href="javascript:;" onclick="$('#formhide').show();">Tell a Friend</a>

      The form:

      <form action="yourScript.php" method="post" onsubmit="$('#formhide').hide();">

      Yea This Worked !! How to default hide div and How To Show Loading Message Before Load Or When Send with any effect?

        Hide the div with CSS:

        <div id="formhide" style="display:none;"></div>

        Loading and sending what?

          anakadote;10968032 wrote:

          Hide the div with CSS:

          <div id="formhide" style="display:none;"></div>

          Loading and sending what?

          After Click Link ! Show loading message for pre loading (please wait . . .) and after submit show loading (please wait . . .) and show any message ( false or true).
          U see Real Example in makaan.com ????

            4 years later
            anakadote;10968172 wrote:

            If you're going to use ajax to load those sections you'd hide and show the loading message from within your callback functions. Here's the applicable info on jQuery.

            Put one start div with name mysecret

            Not in this div must have the forms

            in the action of the submited form "when all is ok"
            if allnot ok{}
            else{
            ?>
            <style>

            #forma{display:none;
            }</style>

            <?php

            echo" Thank you!";
            ?>

            in this method your div id=forma is hidden after the user have submited the form πŸ™‚

            FastπŸ™‚

              7 days later

              Hey anak, Do you like to help me in searching to Create a serialized representation of an array or object?
              I'm stuck to do that.. Please let me know, or tell me from your posted link..

              web development in pakistan

                Write a Reply...