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

2005-05-27 Thread Sean Quinlan
On Fri, 2005-05-27 at 11:04 -0400, Chris Devers wrote: > That or just don't allow page authors to put any old random crap into > the form like this :-) I'm sorry, but if Chris is correct and the authors write the survey forms themselves from scratch and you try to parse the results, then there's y

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

2005-05-27 Thread Sean Quinlan
On Thu, 2005-05-26 at 11:16 -0400, Chris Devers wrote: > 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, d

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

2005-05-27 Thread Chris Devers
On Fri, 27 May 2005, Uri Guttman wrote: > > "JR" == Jim Rose <[EMAIL PROTECTED]> writes: > > JR> I'm missing something here. Why can't you just test to see > JR> if the variable is defined or not on your script? > > because he doesn't know in the code what the list of fields is. This pro

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

2005-05-27 Thread Sean Quinlan
On Fri, 2005-05-27 at 10:43 -0400, Uri Guttman wrote: > > "JR" == Jim Rose <[EMAIL PROTECTED]> writes: > > JR> I'm missing something here. Why can't you just test to see if the > JR> variable is defined or not on your script? > > because he doesn't know in the code what the list of fiel

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

2005-05-27 Thread Uri Guttman
> "JR" == Jim Rose <[EMAIL PROTECTED]> writes: JR> I'm missing something here. Why can't you just test to see if the JR> variable is defined or not on your script? because he doesn't know in the code what the list of fields is. he needs to either parse the html survey page or have some

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

2005-05-27 Thread Charlie
Another way to look at it is in terms of metadata. A SQL database table is a common and convenient way to manage that metadata in the form of a table definition - including data type and NULL/NOT NULL for each data item (aka column). But there are other ways to skin that cat (poor cat). Your s

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

2005-05-27 Thread Jim Rose
I'm missing something here. Why can't you just test to see if the variable is defined or not on your script? On Thursday, May 26, 2005, at 10:55 AM, Alex Brelsfoard wrote: >> Forgive my ignorance, but why would it be a problem not to have these? >> > > Picture a web form that is some sort of a

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

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 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 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 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 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 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 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 Alex Brelsfoard
' if(!exists( $hash->{$_} )); } @array; > > return($hash); > } > > HTH > Thanks > > Sibu Thomas > Liaison Inernational Inc > Watertown, MA > > > > -Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf

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 Sibu Thomas
@array; return($hash); } HTH Thanks Sibu Thomas Liaison Inernational Inc Watertown, MA -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Brelsfoard Sent: Thursday, May 26, 2005 10:56 AM To: Joel Gwynn Cc: boston-pm@mail.pm.org Subj

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

2005-05-26 Thread Philipp Hanes
--- > From: Alex Brelsfoard [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 26, 2005 10:51 AM > To: Philipp Hanes > Cc: '[EMAIL PROTECTED]'; boston-pm@mail.pm.org > Subject: RE: [Boston.pm] Empty radio and checkboxes not passed to perl > scr ipt > > > Thanks

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 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 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 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 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 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 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