Submit Button Confirmation

This is a discussion on "Submit Button Confirmation" within the Web Page Design section. This forum, and the thread "Submit Button Confirmation are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 8th, 2007, 23:22
New Member
Join Date: Dec 2006
Location: toronto canada
Age: 36
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Submit Button Confirmation

Just wondering if anyone would know how to add a confirmation to a submit button on a html page the form is being submit to a php page just want to be able to confirm that the info being submitted is correct before submitting.

if any one could assist it would be appreciated.

Brian
Reply With Quote

  #2 (permalink)  
Old Mar 9th, 2007, 11:42
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Submit Button Confirmation

You'll need to post the php code so we can see what's happening.
Reply With Quote
  #3 (permalink)  
Old Mar 9th, 2007, 12:45
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Submit Button Confirmation

the simple client-side solution is...

<form onsubmit="return window.confirm('Are you sure?');"...

OR...
<input type="submit" value="Submit" onsubmit="return window.confirm('Are you sure?');"...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #4 (permalink)  
Old Mar 9th, 2007, 12:58
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Submit Button Confirmation

I wouldn't do that with JS!
Reply With Quote
  #5 (permalink)  
Old Mar 9th, 2007, 16:32
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Submit Button Confirmation

Ok, Brian wasn't very clear whether he wanted to 1) 'ask the visitor if he realy wants to submit the form' or if he wants to 2) 'validate the data on the form before submitting it'.

In my previous post I answered 1).

2) If this is what you want, then...
assuming that you want to perform some type of validation before the form is submitted, you will need to use javascript.
This would by no means replace serve-side validation and you should still validate every bit of data on the server.

and if this is the case, then you need to tell us what you want to validate...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #6 (permalink)  
Old Mar 9th, 2007, 16:36
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Submit Button Confirmation

Either way ... I would use a server-side language to perform the task. In the off-chance that JS is disabled.
Reply With Quote
  #7 (permalink)  
Old Mar 9th, 2007, 18:15
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Submit Button Confirmation

That's what I said...
Server-side validation is a must have always ever in any scenario for ever and ever!

But javascript validation helps reduce the load on your server...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
Reply

Tags
submit button

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit button problems lucyhjones Starting Out 4 Sep 6th, 2007 18:22
Does a submit button have to be in the form itself Sylvester Web Page Design 1 Apr 17th, 2007 12:14
submit button changes when clicked troublesomegirl JavaScript Forum 0 Feb 18th, 2007 01:10
Form Submit button Help!!! Aaron1988 Web Page Design 2 Nov 25th, 2006 13:51


All times are GMT. The time now is 22:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43