<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Jonathan Hobbs wrote:<br>
<blockquote cite="mid03e301c4a66e$6a7e6c20$647ba8c0@jhdesktop"
type="cite">
<pre wrap="">From: "Larry McDonnell" <a class="moz-txt-link-rfc2396E" href="mailto:larry@technologyinedu.com"><larry@technologyinedu.com></a>
</pre>
<blockquote type="cite">
<pre wrap="">I have run into a wall. I am trying to use a pull down menu to redirect
the form to another page.
<select name="form_action_type" size="1">
<dtml-in lookup_action_query sort=school_name>
<OPTION VALUE="<dtml-var action_file_location>">
<dtml-var school_name> <dtml-var sport_type>
</OPTION>
</dtml-in>
</SELECT>
action_file_location hold the path to where I am trying to get to. I
tried this
<form method="post" action=<dtml-var expr="form_action_type">>
But I get a key error. I am trying to do this on the same form. Can I do
this? Can some point me in the right direction.
</pre>
</blockquote>
<pre wrap=""><!---->
I have never tried tying a method to an html select tag, but I would guess
that the browser would just return a string variable (in your case the form
variable name would be 'form_action_type') containing the result of your
dtml-var tag.
What you may want to try is setting the value of the select options to a
flag value which you test in a zope method to control your redirection.
eg.
<form method="post" action="form_action_method">
<select name="form_action_type" size="1">
<dtml-in lookup_action_query sort=school_name>
<OPTION VALUE="<dtml-var sequence-item>"><dtml-var school_name>
<dtml-var sport_type></OPTION>
</dtml-in>
</SELECT>
...
</form>
You would have a dtml method called 'form_action_method' which checked the
contents of a variable called 'form_action_type' which then takes some
action (ie. redirect)
This assumes that 'lookup_action_query' is some type of sequence that
dtml-in can loop thru.
HTH
Jonathan
</pre>
</blockquote>
Thanks Jonathan, I'll try your suggestion.<br>
<br>
Larry<br>
</body>
</html>