[lnkForumImage]
TotalShareware - Download Free Software

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


 

JoeyP

4/3/2007 2:20:00 PM

Am I not able to build a string and pass it to the cgi class?

#!/usr/bin/ruby -w
require 'cgi'

mystring = ""
mystring << "\'bgcolor\' => \'blue\' "


cgi.body(mystring) {


This will not give me an error but the parameter for body shows up
blank.
if I write:

cgi.p { mystring } I can see that the string is formatted correctly.

Any ideas?

Thanks in advance

1 Answer

Harry

4/3/2007 11:22:00 PM

0

On 4/3/07, JoeyP <plantz.3@wright.edu> wrote:
> Am I not able to build a string and pass it to the cgi class?
>
> #!/usr/bin/ruby -w
> require 'cgi'
>
> mystring = ""
> mystring << "\'bgcolor\' => \'blue\' "
>
>
> cgi.body(mystring) {
>
>
> This will not give me an error but the parameter for body shows up
> blank.
> if I write:
>
> cgi.p { mystring } I can see that the string is formatted correctly.
>
> Any ideas?
>
> Thanks in advance
>
>
>


myhash = {"BGCOLOR" => "BLUE"}

cgi.body(myhash) { }



Harry

--

http://www.kakueki.com/ruby...
Japanese Ruby List Subjects in English