Re: [Boston.pm] Load testing

2005-05-26 Thread Chris Devers
On Wed, 25 May 2005, Bogart Salzberg wrote: > Is WWW::Mechanize more appropriate for this sort of thing? Yes. WWW::Mechanize is exactly the tool for this kind of thing. That or the tools that come with Apache itself, particularly `ab`: Or you

Re: [Boston.pm] Load testing

2005-05-26 Thread Charlie
I have used LWP (LWP::UserAgent, HTTP::Response, HTTP::Cookies, etc.) to write a test harness for web apps. Since I was working with an ancient Perl version, I went low tech for load testing. Write a test case that hammers a server with 1 or a few requests (possibly rotating through differen

[Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Alex Brelsfoard
OK, so I figured out, the hard way, a while ago that when you submit a form with a checkbox or radio button with nothing checked, said checkbox or radio button's field name does NOT get sent, via the browser, to my perl script. It's as if it does not exist. Is there a way to guarantee that the fie

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Philipp Hanes
> The following ideas are options I would _not_ like > to follow if possible: > - set a default checkbox or redio button (so something is > always filled in). > - use a hidden field to list of all the fields in the form. > - have the perl script read the HTML code from the page and > make its ow

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Joel Gwynn
Forgive my ignorance, but why would it be a problem not to have these? On 5/26/05, Philipp Hanes <[EMAIL PROTECTED]> wrote: > > The following ideas are options I would _not_ like > > to follow if possible: > > - set a default checkbox or redio button (so something is > > always filled in). > > - u

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Alex Brelsfoard
Thanks. It's good to know that someone else has noticed this oddity. Sad to say that mny of my user turn off javascript. So I'm am going to have to deal with this on the perl side I've created a script to build a hidden field for me that lists all the non-hidden form fields. So for the mome

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Alex Brelsfoard
> Forgive my ignorance, but why would it be a problem not to have these? > Picture a web form that is some sort of a survey. When that survey is submit the perl script writes out the answers onto a file. That file is tab delimited. Now picture the first person going to the form and filling every

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Joel Gwynn
Sounds like a data validation issue to me. What happens when a mischevious user adds a field that you weren't expecting, but the field name conforms to your convention? Does that get written to the file as well? Generally, I have some sort of array or hash of fields that I'm expecting. If it's

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Bogart Salzberg
On May 26, 2005, at 10:55 AM, Alex Brelsfoard wrote: > all the worlds > wine turns into bags of turnips > No! Save the wine! I'm assuming that this is a problem for you because the names of form fields are dynamic or otherwise change without reliable warning. (Because if the field names ar

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Chris Devers
On Thu, 26 May 2005, Alex Brelsfoard wrote: > Picture a web form that is some sort of a survey. When that survey is > submit the perl script writes out the answers onto a file. That file > is tab delimited. Stop right there, doctor, I think we've found the problem. If you used a more robust st

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Philipp Hanes
The most confusing scenario I've found that occurs a lot (for me, anyway, depends on the kinds of pages you build) is where there's a check box on the page that should be initialized to "checked" the first time the person gets to the page, and obviously preserve the value if they submit the page an

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Sibu Thomas
Hi, We use something like following at the Perl level to check for radio button and check boxes that are not passed from HTML form. #-- # At CGI save level, receive all the params using CGI object. my $cgi = $self->query(); my @array = $cgi->param;

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Alex Brelsfoard
> On Thu, 26 May 2005, Alex Brelsfoard wrote: > >> Picture a web form that is some sort of a survey. When that survey is >> submit the perl script writes out the answers onto a file. That file >> is tab delimited. > > Stop right there, doctor, I think we've found the problem. > Actually the prob

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Alex Brelsfoard
Thanks Sibu. But the problems is that even the names of the checkboxes and radio buttons are going to be dynamic. I really can't hard code any names like this. Thanks. --Alex > Hi, > We use something like following at the Perl level to check for radio > button > and check boxes that are not pas

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Bogart Salzberg
On May 26, 2005, at 11:22 AM, Alex Brelsfoard wrote: > This is indeed the case. If browsers reliably submitted form fields in the same order they were listed in the HTML source, then you could double up with a hidden form field like and then receive either form.html?sign_me_up=0 or

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Chris Devers
On Thu, 26 May 2005, Alex Brelsfoard wrote: > Think of it this way: My perl script reads in all the data sent to > it, creating a list of fields. Then I spit out the values associated > with those fields (who cares how). But when a checkbox is NOT filled > in, that field name is NOT sent to my

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Alex Brelsfoard
Yeah, but still we need to remember to put that hidden field in to hold the place of the checkbox's name. Part of my problem is that there are MANY differen humans who are making forms who use my script. WAY too much human error availability. My helper script that reads the HTML to create a list

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Bogart Salzberg
On May 26, 2005, at 11:59 AM, Alex Brelsfoard wrote: > Yeah, but still we need to remember to put that hidden field in to > hold > the place of the checkbox's name. > Part of my problem is that there are MANY differen humans who are > making > forms who use my script. WAY too much human erro

Re: [Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Uri Guttman
> "AB" == Alex Brelsfoard <[EMAIL PROTECTED]> writes: AB> OK, so I figured out, the hard way, a while ago that when you submit a AB> form with a checkbox or radio button with nothing checked, said checkbox AB> or radio button's field name does NOT get sent, via the browser, to my AB> p

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Uri Guttman
> "AB" == Alex Brelsfoard <[EMAIL PROTECTED]> writes: >> On Thu, 26 May 2005, Alex Brelsfoard wrote: >> >>> Picture a web form that is some sort of a survey. When that survey is >>> submit the perl script writes out the answers onto a file. That file >>> is tab delimited. AB> A

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Uri Guttman
> "AB" == Alex Brelsfoard <[EMAIL PROTECTED]> writes: AB> Yeah, but still we need to remember to put that hidden field in to hold AB> the place of the checkbox's name. AB> Part of my problem is that there are MANY differen humans who are making AB> forms who use my script. WAY too muc

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread Bogart Salzberg
On May 26, 2005, at 11:59 AM, Alex Brelsfoard wrote: > Yeah, but still we need to remember to put that hidden field in to > hold > the place of the checkbox's name. > Part of my problem is that there are MANY differen humans who are > making > forms who use my script. WAY too much human erro

Re: [Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Chris Devers
On Thu, 26 May 2005, Uri Guttman wrote: > [...] the common falacy of using javascript for data validation which > leads to dropping that from the server. What fallacy is this ? There's nothing wrong with using Javascript to validate form data, and if you do it well, you can provide better and mo

Re: [Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Uri Guttman
> "CD" == Chris Devers <[EMAIL PROTECTED]> writes: CD> On Thu, 26 May 2005, Uri Guttman wrote: >> [...] the common falacy of using javascript for data validation which >> leads to dropping that from the server. CD> What fallacy is this ? CD> There's nothing wrong with using Javascr

Re: [Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Alex Brelsfoard
Well, it's all moot for me anyways. Many of my users will have javascript turned off. So I am used to NOT relying on javascript for anything. --Alex >> "CD" == Chris Devers <[EMAIL PROTECTED]> writes: > > CD> On Thu, 26 May 2005, Uri Guttman wrote: > >> [...] the common falacy of using j

Re: [Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Chris Devers
On Thu, 26 May 2005, Uri Guttman wrote: > > "CD" == Chris Devers <[EMAIL PROTECTED]> writes: > > CD> Properly done, validation should happen on *both* sides, > CD> but minimally it has to happen on your side. > > it doesn't ever have to be done on the client side. Right. Just like you do

Re: [Boston.pm] Empty radio and checkboxes not passed to perl script

2005-05-26 Thread Uri Guttman
> "CD" == Chris Devers <[EMAIL PROTECTED]> writes: CD> On Thu, 26 May 2005, Uri Guttman wrote: >> > "CD" == Chris Devers <[EMAIL PROTECTED]> writes: >> CD> Properly done, validation should happen on *both* sides, CD> but minimally it has to happen on your side. >> >> it doe

Re: [Boston.pm] Empty radio and checkboxes not passed to perl scr ipt

2005-05-26 Thread David Cantrell
Alex Brelsfoard wrote: > Picture a web form that is some sort of a survey. When that survey is > submit the perl script writes out the answers onto a file. That file is > tab delimited. > Now picture the first person going to the form and filling everything out, > including all checkboxes and ra