How to remove a carriage return from a field?

Klaus Major klaus at major-k.de
Thu Jan 19 15:30:02 EST 2006


Hi Claire,

> In my stack, the user enters identifying information into a field,  
> and this text is used to build a filename for ftp upload. This  
> works fine as long as the user does not enter a carriage return at  
> the end of the field. If the user does press "enter," this messes  
> up the upload. How can I script it so that any carriage returns are  
> removed from the field?
>
> Suggestions for actual scripts would be very much appreciated since  
> I am a newbie. :-)

you could add a "dummy" script to that field:

on enterinfield
   ##
end enterinfield

on returninfield
   ##
end returninfield


This way the user can hit ENTER or RETURN "until the cows come home"
but that will not appear in the field :-)

> Thanks very much,
> -- 
> Claire Bradin Siskin
> http://edvista.com/claire/

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list