D
Dennis Roberts
I think I must be doing something wrong. I am attempting to generate a
form which values from existing data. Here is a simplified version of
what I am trying to do (see below). I don't get a form element with
this, I get something like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><BODY><FORM
METHOD="post"
ENCTYPE="application/x-www-form-urlencoded">onetwothree</FORM></BODY></HTML>
I also notice the HEAD and TITLE tags are missing. Any advice?
#!/usr/bin/ruby -w
require 'cgi'
cgi = CGI.new("html3")
ary = %w( one two three )
cgi.out do
cgi.html do
cgi.head do
cgi.title("Form Test")
end
cgi.body do
cgi.form do
ary.each do |value|
cgi.text_field(value, value)
end
end
end
end
end
form which values from existing data. Here is a simplified version of
what I am trying to do (see below). I don't get a form element with
this, I get something like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><BODY><FORM
METHOD="post"
ENCTYPE="application/x-www-form-urlencoded">onetwothree</FORM></BODY></HTML>
I also notice the HEAD and TITLE tags are missing. Any advice?
#!/usr/bin/ruby -w
require 'cgi'
cgi = CGI.new("html3")
ary = %w( one two three )
cgi.out do
cgi.html do
cgi.head do
cgi.title("Form Test")
end
cgi.body do
cgi.form do
ary.each do |value|
cgi.text_field(value, value)
end
end
end
end
end