Current location: Hot Scripts Forums » Programming Languages » ASP » close form


close form

Reply
  #1 (permalink)  
Old 08-18-03, 10:28 PM
sasi sasi is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
close form

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....
Reply With Quote
  #2 (permalink)  
Old 08-25-03, 02:27 AM
Mister B.'s Avatar
Mister B. Mister B. is offline
Wannabe Coder
 
Join Date: Jul 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
yeah... It can be done... lemme think...

Okay, you make a form, and you make it post to the main form. also though you make it so when pushed, it goes to a JavaScript Function. In the function, you make it alert so whether to exit or not. if not then make return = false, and if so return = true.
__________________
God save us from the religious fanatics
Reply With Quote
  #3 (permalink)  
Old 08-25-03, 05:23 AM
greeny greeny is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
<input type="button" onclick="closeform()" />
Code:
<script type="text/javascript">
  function closeform()
  {
    btn = confirm("Would you like to close the form?");
    if (btn == true)
    {
      location="main_form.html";
    }
  }
</script>
hope this is what you mean???
__________________
thanks,
valen@efusian.co.uk
Reply With Quote
  #4 (permalink)  
Old 08-25-03, 08:03 PM
sasi sasi is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
thanks a lot.........
Reply With Quote
  #5 (permalink)  
Old 08-26-03, 03:51 AM
greeny greeny is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
no problem
__________________
thanks,
valen@efusian.co.uk
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkboxes on form = mailto recipient. Bojon PHP 4 12-21-04 06:07 PM
SQL database registration form help vinhkhuong PHP 3 10-10-03 03:49 AM
asp: URGENT! need to change code to create new form per id seala ASP 2 09-09-03 09:54 PM
asp: checkboxes & multi-page form seala ASP 0 09-02-03 01:58 PM
Need Bravenet Alternative... bobby444 General HotScripts Site Discussion 10 07-17-03 09:36 PM


All times are GMT -5. The time now is 03:17 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.