On 9/10/06 11:17 AM, "Trevor Hopkins" <[EMAIL PROTECTED]> wrote:

> I'm trying to build a form whose "submit" button only becomes enabled after
> text is present in a specific field (and likewise when that field is blank,
> the "submit" button returns to disabled status). Does anyone know of a
> painless way to do this? I'd also like the user to be able to hit return
> from within that field and have the "submit" button entered. Right now, it
> seems, the return key must be hit twice in order to first exit the field and
> then select "submit".

The easiest way IMHO is to put this script in the field:

on rawKeyUp
  set the enabled of btn "Submit" to (me is not empty)
end rawKeyUp

on returnInField
  click at loc of btn "Submit"
end returnInField

Now what this will do is not allow returns in the text field; i.e. any
returns hit in the field will trigger the Submit button. And by testing the
contents of the field when the keystroke has completed, we can determine
whether to enable or disable the Submit button.

Will this work for you?

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to