Cliff,
My URL contains ...&my_select=1&...
But when the page is rendered the my_select option is not selected.
option I suppose is a better choice of words here vs. select since select is
the form element type and the option is what actually gets selected.
That is:
<SELECT NAME="my_select">
<OPTION VALUE="0">None
<OPTION VALUE="1">One
</SELECT>
And from the perldocs:
OPTION
Embperl checks if there is a value from the form data for a specific
option in a menu. If so, this option will be pre-selected.
Example:
<FORM METHOD="POST"> <P>Select Tag</P>
If you request this document with list.htm?SEL1=x
you can specify that the element which has a value
of x is initially selected
<P><SELECT NAME="SEL1">
<OPTION VALUE="[+ $v[$row] +]">
[+ $k[$row] +]
</OPTION>
</SELECT></P>
</FORM>
The values I am trying to select contain no spaces which I thought may be the
culprut to begin with.
Hope that explains it a little better.
Aaron Johnson
Cliff Rayman wrote:
> Not sure what you mean when you say selects are not selected.
>
> cliff rayman
> genwax.com
>
> Aaron Johnson wrote:
>
> > I thought I had gotten smart. I am working on a project with a none
> > coder. They know HTML fairly well so I had come up with a plan that
> > would keep them from having to look at as much Embperl code as
> > possible.
> >
> > Here is my idea:
> > (db_row_hash is a function from an extrnal module that returns a
> > fetchrow_hashref of the data from the database )
> > [- $prospect_data = db_row_hash("SELECT * FROM Prospect WHERE
> > Prospect_ID = $udat{Prospect_ID}") -]
> >
> > [$ foreach $key (sort keys %$prospect_data) $]
> > [- $value = $prospect_data->{$key}; -]
> > [- $url .= qq|$key\=$prospect_data->{$key}\&|; -]
> >
> > [$ endforeach $]
> > [+ $url +]
> > [- $http_headers_out{'Location'} = "newvisitor_reg2.html?$url"; -]
> >
> > This works great and passes the returned values to the page, however the
> >
> > selects are not selected. The input fields are filled in however.
> >
> > Do the selects have to be dynamic (while/foreach) to be selected?
> > I am I expecting too much from the Embperl parser?
> >
> > Embperl VERSION: 1.2.0
> >
> > On Windows 98 with Apache 1.3.9 and mod_perl 1.21
> >
> > Aaron Johnson
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]