[Zope] Passing parameters via URL

Thomas B. Passin tpassin@mitretek.org
Thu, 25 Apr 2002 11:02:49 -0400


The first thing you should do is to construct (by hand) a url that works.
Next, look at the html produced by your code (use View/Source in the
browser) and see whether it is creating the string that you expect.  If not,
you will be in a better position to understand where something is going
wrong.

At this point, you can come to the list and say "Here is what I want to do,
here is my code, here is what I actually get.  How can I make it produce the
output I need?"

Your code would be easier to read (and so get right) if you use Python's
string formatting syntax:

result=result+'<form action="%s/conversion?text_url=%s"'\
    % (container.absolute_url(),text_url)

(I shortened your example a little).

Also, your example creates mal-formed html, because you have  <a> and <p>
elements that end in the form but do not start in the form.  You need to
design proper html and get it working by hand, then try to create that same
html with the code.

Cheers,

Tom P

[Raj NS]

I'm in small problem ( i guess ). I have made a
product , and inside which everytime i call something
like http://localhost:8080/something?foo=bar
i get a ZOPE error saying unable to send a variable
foo .. check url .. try again ..and blah blah ...

frankly, i tried this on netscape 4.77 and again later
i tried it on IE it was working fine . Now someone
told me netscape 4.7x is buggy u need some
urldecoders/encodes ...

here goes the codes
############
...
print '</form>'
print '<form
action='+container.absolute_url()+'/conversion?tex_url='+tex_url+'&tex_id='+
tex_id+'method="POST">'
print '<input type="submit" value="Convert"
name="Convert"></a></p>'
print '</form>'
...

############

this calls conversion.py ( which takes params
tex_url,tex_id)