Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-09 Thread Mark Haney
# This moves the custom shifts [...] Try \@rows_shift That was originally the way I had it. I was doing essentially what I had done with the previous SQL statement, going to each row and pushing it into an array. For some reason, it doesn't work the same way. -- Mark Haney Software Developer

Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-09 Thread Mark Haney
On 10/09/2012 07:50 AM, Mark Haney wrote: That was originally the way I had it. I was doing essentially what I had done with the previous SQL statement, going to each row and pushing it into an array. For some reason, it doesn't work the same way. Well, after a weekend spent with my

Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-09 Thread Mark Haney
can think of that would possibly cause the problem. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux ___ templates mailing list templates@template-toolkit.org http

Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-09 Thread Mark Haney
the word 'shift' in the FOREACH loop. The only thing I changed was the variable that was being passed to the template. In fact, I just ran it again to double check. Still no errors. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1

Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-09 Thread Mark Haney
from a link on the main page, the perl gets executed and populates the options list automatically. There's really nothing to it. I can't imagine /why/ this is working now, but, as far behind as I am now, I don't think I particularly care. -- Mark Haney Software Developer/Consultant AB Emblem

Re: [Templates] Multiple queries to populate drop down list boxes.

2012-10-04 Thread Mark Haney
On 09/27/2012 01:20 PM, Ronald J Kimball wrote: On Thu, Sep 27, 2012 at 1:10 PM, Mark Haney ma...@abemblem.com mailto:ma...@abemblem.com wrote: Can you show us the call to process the template? Ronald My apologies all, I've been afflicted with RA since a teenager (until I was 38

Re: [Templates] Multiple queries to populate drop down list boxes.

2012-10-04 Thread Mark Haney
the perl and the template. Something I probably should have done earlier. I was hoping it was something a new set of eyeballs would notice. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux

Re: [Templates] Multiple queries to populate drop down list boxes.

2012-10-04 Thread Mark Haney
queries to populate drop down list boxes. On Thu, 27 Sep 2012 17:10:39 + Mark Haney ma...@abemblem.com wrote: my @rows_shift; while (my $row_shift = $sth-fetchrow_array() ) { push @rows_shift, $row_shift; } BTW, this is equivalent: my $rows_shift = $sth

Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-04 Thread Mark Haney
code to see what's wrong. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org

Re: [Templates] Multiple queries to populate drop down list boxes. Updated

2012-10-04 Thread Mark Haney
/src', '/home/markh/work/epic.git/code/embmon-web/lib'], # pre-process lib/config to define any extra values PRE_PROCESS = ['config'] }); $template-process($file, $vars) || die Template process failed: , $template-error(), \n; -- Mark Haney Software Developer/Consultant

[Templates] Multiple queries to populate drop down list boxes.

2012-09-27 Thread Mark Haney
}; I've tried everything I can think of, but all it's doing is passing the name of the perl script (shift_rpt.pl) to the dropdown box. The factory one works as advertised. I just don't have a clue why one works and the other doesn't. Any ideas? Or perhaps a better way to do this? -- Mark

[Templates] Pre-Processing new template and variables

2012-09-06 Thread Mark Haney
to fix it. Thanks. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman

Re: [Templates] Pre-Processing new template and variables

2012-09-06 Thread Mark Haney
. It works now and thanks a lot guys. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org

[Templates] FOREACH question

2012-08-23 Thread Mark Haney
(in this instance it will always be 4). Keep in mind that this code is inside an HTML template, so I don't really want any perl in it if I can help it. Any ideas? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux

[Templates] FOREACH question

2012-08-23 Thread Mark Haney
(in this instance it will always be 4). Keep in mind that this code is inside an HTML template, so I don't really want any perl in it if I can help it. Any ideas? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux

Re: [Templates] FOREACH question

2012-08-23 Thread Mark Haney
apologies for double posting. My first post never got to my inbox, so I thought it had been rejected. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux ___ templates

Re: [Templates] multiple fields from SQL query --Update

2012-05-31 Thread Mark Haney
code I got the Factory abbreviation to show up in the drop down just fine. Granted it didn't include the id, but at least I had that part working. I'm at a loss now. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.7-1.fc16.x86_64 GNU/Linux

Re: [Templates] multiple fields from SQL query --Update

2012-05-31 Thread Mark Haney
to the toolkit, I got my variable names all screwed up. It is a good reminder to not have duplicate or similar variable names. Especially for me and my ADHD. Thanks again. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.7-1.fc16.x86_64 GNU

Re: [Templates] multiple fields from SQL query --Update

2012-05-29 Thread Mark Haney
believe this will work, and I'll check it later today. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.6-3.fc16.x86_64 GNU/Linux ___ templates mailing list templates@template-toolkit.org http

[Templates] multiple fields from SQL query

2012-05-24 Thread Mark Haney
IN factory %] option value= size=20[% name %]/option [% END %] /select -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.6-3.fc16.x86_64 GNU/Linux ___ templates mailing list

Re: [Templates] multiple fields from SQL query --Update

2012-05-24 Thread Mark Haney
On 05/24/2012 10:52 AM, Mark Haney wrote: I've got a query in my perl code to pull 2 fields from a database (abbreviation, factory_id), one of which is used to populate a dropdown box (abbreviation). However, I will need to pass /both/ fields to the CGI script that I'm calling from the form

Re: [Templates] populating dropdown box from db

2012-05-09 Thread Mark Haney
, you're right. It didn't register at the time that I would need the [% %] tags for the value substitution. That's probably due to the rookie with TT that I am. That works, thanks a lot. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.4-3.fc16

Re: [Templates] populating dropdown box from db

2012-05-09 Thread Mark Haney
IN factories %] option value=[% factory %]/option [% END %] /select I am not sure why you would want to wrap the FOREACH around the select. Wrapping the select in the OP was a mistake on my part. I actually fixed that just after sending the post. -- Mark Haney Software Developer/Consultant AB