943,752 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jun 30th, 2009
0

prevent user from going back or disable submit

Expand Post »
i have a form being filled. i don't want the user to be able to submit twice. how can i either prevent the user from going back or disable the submit button?

i am currently disabling the submit button but when the user clicks back(from the next page) it asks whether it should resend data. when the data is resent it loads the original version of the page(without submit disabled).

can someone help me with this? thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
itnagusak is offline Offline
12 posts
since Jun 2009
Jun 30th, 2009
0

Re: prevent user from going back or disable submit

are you using asp or any other server side scripting language ?
Last edited by aashishn86; Jun 30th, 2009 at 10:58 am.
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jun 30th, 2009
0

Re: prevent user from going back or disable submit

i'm using javascript
Reputation Points: 10
Solved Threads: 0
Newbie Poster
itnagusak is offline Offline
12 posts
since Jun 2009
Jun 30th, 2009
0

Re: prevent user from going back or disable submit

Click to Expand / Collapse  Quote originally posted by itnagusak ...
i'm using javascript
javascript is for client side

anything for server side ?
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jun 30th, 2009
0

Re: prevent user from going back or disable submit

no
Reputation Points: 10
Solved Threads: 0
Newbie Poster
itnagusak is offline Offline
12 posts
since Jun 2009
Jul 1st, 2009
0

Re: prevent user from going back or disable submit

can't think of anything
i'll post back if i can figure a way out...
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jul 1st, 2009
0

Re: prevent user from going back or disable submit

but if you aren't using any client side scripting language , how are you saving the data ?
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jul 2nd, 2009
0

Re: prevent user from going back or disable submit

saving it to a file using php..is that a scripting language?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
itnagusak is offline Offline
12 posts
since Jun 2009
Jul 2nd, 2009
0

Re: prevent user from going back or disable submit

Click to Expand / Collapse  Quote originally posted by itnagusak ...
saving it to a file using php..is that a scripting language?
yeah.....
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jul 2nd, 2009
0

Re: prevent user from going back or disable submit

i tried using sessions..
i set a sessions variable to 1 if the form data was submitted.
i check if the the variable is one on the concerned page and if it is i call a function which disables the submit button. but this doesnt work either. any thoughts about this?

heres the code
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <?php
  2. if($_SESSION['disable']==1){
  3. echo "<script type="text/javascript"> disablesbmt(); </script>";
  4. }
  5. ?>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
itnagusak is offline Offline
12 posts
since Jun 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: php within echo statement / hide element
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Redirecting user to a login page





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC