in reply to Javascript with CGI::FormBuilder and Template Toolkit

$form->field( name => 'go_live_date', a => $lot );

Uh, what are you expecting to happen there? You're asking FormBuilder to insert an "a" attribute into the field with the specified value. FormBuilder is (correctly) quoting the value of the attribute for insertion in HTML. There's nothing you can quote to "fix" that.

The documentation does not seem to mention any way to add arbitrary tags. Why not use FormBuilder's TT2 support? That way you have full control over everything.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Javascript with CGI::FormBuilder and Template Toolkit
by set_uk (Pilgrim) on Nov 11, 2003 at 13:18 UTC
    I am now using Temptate Toolkit to include the javascript - the problem now is that Apache complains about the files that the are referenced. When i have had this before it is because apache doesn't like non executable files in the cgi-bin dir.

    I've tried moving the files out of the directory but then the javascript doesn't work.

    I'm wading through the manuals - any tips to get my up the learning curve quicker

    [Tue Nov 11 10:33:40 2003] [error] (8)Exec format error: exec of /expo +rt/www/devel/htdocs/www-default/cgi-bin/ipopeng.htm failed
    Nevermind sorted it - was to with javascript not wanting to fire in a specific dir
      Your web server is probably not set up to execute .htm files. Instead, it is set up to execute .cgi files. Your cgi-script (.cgi) needs to load the template (.htm), perform parameter substitution, and send the HTML contents off down the wire. The Javascript is executed by the requester's browser, not your web server.

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
        That much I understand. I discovered that the cause was the javascript files residing in the images dir of the webserver - moved then elsewhere and it worked. Thanks