[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

CSS integration with CGI objects

Javier Valencia

2/21/2005 11:38:00 PM

I think that the CGI class is still in development, isn't it?
How can i add a "class" attribute to my elements? I want to use CSS in
my scripts.
For example for a CGI.text_field.


6 Answers

Austin Ziegler

2/22/2005 3:30:00 AM

0

On Tue, 22 Feb 2005 08:38:20 +0900, Javier Valencia <jvalencia@log01.org> wrote:
> I think that the CGI class is still in development, isn't it?
> How can i add a "class" attribute to my elements? I want to use CSS in
> my scripts.
> For example for a CGI.text_field.

Recommendation: don't use the CGI HTML generation. Use a templating
environment, such as Amrita or even the RDoc templating included with
Ruby.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


James Britt

2/22/2005 4:39:00 AM

0

Austin Ziegler wrote:
> On Tue, 22 Feb 2005 08:38:20 +0900, Javier Valencia <jvalencia@log01.org> wrote:
>
>>I think that the CGI class is still in development, isn't it?
>>How can i add a "class" attribute to my elements? I want to use CSS in
>>my scripts.
>>For example for a CGI.text_field.

I believe you can pass a hash of attribute name/values to the method
>
>
> Recommendation: don't use the CGI HTML generation. Use a templating
> environment, such as Amrita or even the RDoc templating included with
> Ruby.

Or consider using the XmlBuilder lib, which as an API somewhat similar
to the CGI HTML stuff.

http://onestepback.org/index.cgi/Tech/Ruby/BuilderOb...

James
>
> -austin



Javier Valencia

2/22/2005 11:55:00 AM

0

James Britt wrote:

> Austin Ziegler wrote:
>
>> On Tue, 22 Feb 2005 08:38:20 +0900, Javier Valencia
>> <jvalencia@log01.org> wrote:
>>
>>> I think that the CGI class is still in development, isn't it?
>>> How can i add a "class" attribute to my elements? I want to use CSS in
>>> my scripts.
>>> For example for a CGI.text_field.
>>
>
> I believe you can pass a hash of attribute name/values to the method
>
>>
>>
>> Recommendation: don't use the CGI HTML generation. Use a templating
>> environment, such as Amrita or even the RDoc templating included with
>> Ruby.
>
>
> Or consider using the XmlBuilder lib, which as an API somewhat similar
> to the CGI HTML stuff.
>
> http://onestepback.org/index.cgi/Tech/Ruby/BuilderOb...
>
> James
>
>>
>> -austin
>

mmm but using other methods means that cgi forms will not use
automatically cookies and such things


Javier Valencia

2/22/2005 2:00:00 PM

0


>>>
>>>
>>> Recommendation: don't use the CGI HTML generation. Use a templating
>>> environment, such as Amrita or even the RDoc templating included with
>>> Ruby.
>>
>>
>>
>> Or consider using the XmlBuilder lib, which as an API somewhat
>> similar to the CGI HTML stuff.
>>
>> http://onestepback.org/index.cgi/Tech/Ruby/BuilderOb...
>>
>> James
>>
>>>
>>> -austin
>>
>>
>
> mmm but using other methods means that cgi forms will not use
> automatically cookies and such things
>
>
I've tried amrita, but it gives me lots of Security Errors, i've tried
using RubySafeLefel 0 on mod_ruby configuration, but the problem still
continues.

[Tue Feb 22 13:57:38 2005] [error] mod_ruby: error in ruby
[Tue Feb 22 13:57:38 2005] [error] mod_ruby:
/usr/lib/ruby/site_ruby/1.8/amrita/vm.rb:54:in `instance_eval': Insecure
operation - instance_eval (SecurityError)



Makoto Kuwata

2/23/2005 9:16:00 PM

0

> I've tried amrita, but it gives me lots of Security Errors,

How about Kwartz?
Kwartz is faster and easier than amrita.
http://www.kuwata-lab.c...

--
regards,
kwatch

Makoto Kuwata

2/23/2005 9:17:00 PM

0

> I've tried amrita, but it gives me lots of Security Errors,

How about Kwartz?
Kwartz is faster and easier than amrita.
http://www.kuwata-lab.c...

--
regards,
kwatch