CGI

J

JoeyP

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
 
H

Harry

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,049
Members
47,655
Latest member
eizareri

Latest Threads

Top