Thanks. That's what I'm doing. I was looking for a programmatic way of
accomplishing it:
my @inputs = $template->cgi ( 'input' );
foreach my $input ( @{ $template->cgi ( 'input' ) } ) {
$input->set_attribute ( 'readonly', 'readonly' );
}
---
Mark Mertel
TEK systems
Desk: 425.288.7214
Mobile: 206.353.2663
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Sven Neuhaus
Sent: Tuesday, April 29, 2008 12:39 AM
To: [email protected]
Subject: Re: [htmltmpl] fetch the CGI objects
Mertel, Mark schrieb:
> After loading the template, can I fetch all of the input fields and
set
> them to readonly?
Wether or not a input field is disabled is controlled by the disabled
Attribute of the HTML element.
For HTML 4.01:
<input disabled ...>
For XHTML:
<input disabled="disabled" .../>
So, if you want to control the disabled status from your script, you can
use this in your template:
For HTML 4.01:
<input <TMPL_VAR NAME="disabled_flag"> ...>
For XHTML:
<input <TMPL_VAR NAME="disabled_flag"> .../>
In your source code, you can then choose to set the flag:
For HTML 4.01:
$template->param(disabled_flag => "disabled");
For XHTML:
$template->param(disabled_flag => 'disabled="disabled"');
Hope that helps...
Regards,
-Sven Neuhaus
------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
Html-template-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/html-template-users
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Html-template-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/html-template-users