From: "stefan s." Date: 2003-11-27T03:32:12+09:00 Subject: Re: another stupid question: filling out webforms hi thx for helping me! "Bermejo, Rodrigo" schrieb im Newsbeitrag news:3FC4CAE1.3030308@ps.ge.com... > Try this... > > > def random_text > > letters = ("a".."z").to_a > > letters.each_index do | l | > > r = rand(letters.length - 1); > > letters[l],letters[r] =letters[r],letters[l] > > end > > string = letters[0,rand(8)].to_s > > if string.empty? > random_text > else > return string > end > > end > > print %^^ > > > > it is what you are looking for ? > > > > > > stefan s. wrote: > > >hi > > > >i�d like to fill out a html webform with ruby with randomly generated > >values. an example: > > > >- the form is @ www.mypage.com/webform.html > >- there�s one field in this form: "zip" () > >- i should be filled out with a random text-value smaller than 8 characters > >by the ruby script > > > >please help me! > > > >p.s. excuse my bad english :) > > > > > > > > > > >