Re: Need to have access to script name in Template Toolkit
Steve Peters <[email protected]> Fri, 22 Feb 2013 11:10:26 -0600
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <CAP0GdH1=yFftvb1norhFtqws6qCBk57=R1QkC5ifKA2bxQ3g0w@mail.gmail.com> |
Looking at the documentation of name method of CGI::FormBuilder, it doesn't seem to return anything. My suggestion would be to hide both images using CSS, use JS to get the form's name, then display the appropriate image. That said, I'm not sure that basing this off the form name really the correct thing here. Two similar pages could be differentiated off of an id or class on the body element or some sort of div container. Then, the image that changes could be a CSS background on a div depending on the body for a programming free solution. Steve On Fri, Feb 22, 2013 at 9:52 AM, Harry Jamieson <[email protected]>wrote: > I need to have access to the script name as given in the action line, as > shown here... > > <form action="standard_mnt.pl" class="fb_form" id="update_scrn" method="get" name="update_scrn" onsubmit="return validate_update_scrn(this);"><input id="_submitted_update_scrn" name="_submitted_update_scrn" type="hi > dden" value="1" /> > > The id= or name= value is what I'm looking for. I want to condition the > appearance of some images based on which of two very similar screens come > up. I'm using Formbuilder, and have tried [% form.name %] to to no > avail. I'm hoping that this will be an easy question to answer, but my > searches have not turned anything up yet. Thanks in advance for your help. > > Harry Jamison > > _______________________________________________ > templates mailing list > [email protected] > http://mail.template-toolkit.org/mailman/listinfo/templates > > _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates