Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: close form

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    18
    Member #
    2520
    i think this should be very simple...but i don know how to do it?...

    i have a exit button...where when i click on it..it should show msg box..asking whether to close the form or not?..if yes it should colse the form and show the main form...if no..it should redirect to the same form..hw to do this using asp...plz help....

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    This requires the use of javascript, like so:
    Code:
    <script language="javascript">
        function closeForm() {
            if (window.confirm('Close the form?') {
                // Redirect to the main form
                window.location.href='main_form.htm'  
            }
        }
    </script>
    <body>
        <form>
            Test
            <input name="test" />
        </form>
        <button type="button" onclick="closeForm()">Close</button>
    </body>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:31 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com