Welcome to CrankyGoblin.Com Sign in | Join | Help

Public Class GeoffAppleby

Inherits Microsoft.VisualBasic.MVP : Implements IBrainFart
Another GAPTCHA Improvement

Update: The source is now live

I've now got timeouts working. Currently for this blog, the selected set of pictures you must click on to successfully submit a comment will expire 10 minutes after the page loads. This means that if you take a long time to write a comment, submission might still fail.

But that's alright, because your comment text will not be lost, and you can resubmit with a new set of pictures - too easy!

With this I'm now also providing a link to automatically get a new set of pictures, which also resets the timeout - so if you know you've gone over time, you don't have to be told off with an error message that you knew you were going to get anyway.

The only condition here is that just like for trying to submit the comment, getting the new set of pictures will only actually happen if there's text in the comment field. I've only just discovered this feature, so I need to see if it's possible for form validators to only run when the Submit button is being pressed, not the 'new pictures' link. I haven't used any of the validation controls in asp.net yet, so if anyone knows if/how it can/can't be done, feel free to leave me a comment telling me how ;)

I'm getting pretty close to the stage where I can release the source for this. Possibly even tomorrow night (w00t!) - but it depends on how much sleep I get tonight. And on that note, I'm off to bed. G'night everyone :)

Posted: Thursday, 19 October 2006 12:04 AM by Geoff Appleby

Comments

Bernardo Heynemann said:

Very easy, just change the ValidationGroup on the link to something different. Than it will only be invoked when a button (or link or image for that matter) with the same ValidationGroup gets hit!

# October 18, 2006 7:36 AM

Geoff Appleby said:

Well what do you know? Too easy :) I'll poush this fix through soon. Thanks!

# October 18, 2006 1:41 PM

Geoff Appleby said:

Done! I set ValidationGroup="SomethingElse" just like you said, and it's all working fine :)

# October 18, 2006 2:21 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

To submit your comment, click on these pictures:
  • Happy Geoff
  • Teenage Mutant Ninja Geoffy!
  • Super Geoff!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Gaptcha Image - No Peeking! Gaptcha Image - No Peeking! Gaptcha Image - No Peeking!
Can't recognise the people in these pictures? Look here for a quick introduction.
There's a time limit for you to get your comment submitted before this set of pictures expires. If you think it's been longer than 10 minutes, get some new pictures first (you won't lose what you've typed so far).
Get some new pictures 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS