Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 982
BY: Steven Ketcham (stedak)
DATE: 2004-02-29 22:05


OK. I tried using ruwiki at home and I was sort of successfull. I did find that IE handles form variables slightly different than the expected code. It might be worth while to change the edit template to use Javascript for the submitions as opposed to using submit buttons (IE uses the title of the submit button for the value as oppsed to the ...value).

I also had trouble using ruwiki as a CGI because the 'topic' parameter was not available from the address.

I have some code that got me going but I am not sure if it is what should be used. If it is great.

Code samples to follow (two different files):

in ruwiki.rb

def process_page


if @action
case @action
when 'edit', 'create'


when 'save', '<u>s</u>ave' # <----- IE handles this differently


when 'cancel', '<u>c</u>ancel' # <----- IE handles this differently

# Outputs the page.
def output
@response.add_header("Content-type", "text/html")
@response.add_header("Cache-Control", "max-age=0") # <----- This seems to prevent caching but I am not 100% on it.
@response << @rendered_page

in handler.rb

# Request for CGI-based activity to ruwiki.
class CGIRequest < AbstractWebRequest
def initialize(cgi, output_stream = $stdout)
@environment = ENV
@cgi = cgi
@parameters = {}
cgi.params.each { |k, v| @parameters[k] = v[0] }

# CGI handling with APACHE 2.0.43
testTopic = @parameters.has_key? 'topic'
testProject = @parameters.has_key? 'project'
if testTopic == false && testProject == true then
project = @parameters['project']
envPathInfo = ENV['PATH_INFO']
envPathInfo.split('/').each do |value|
@parameters['topic'] = value if value != project

Thread View

Thread Author Date
IE 6.0 and CGISteven Ketcham2004-02-29 22:05
      RE: IE 6.0 and CGIAlan Chen2004-03-01 07:45
            RE: IE 6.0 and CGISteven Ketcham2004-03-01 12:46

Post a followup to this message