John
-
SELECTED="<@arg
projects>" will do it.
If you lose your
default, try something like this:
<@IF
EXPR='<@ARG ContactState>=""'
TRUE='<@assign name="temp" scope="request" value="@@user$defaultstate[*,BaseOneId]">'
FALSE='<@assign name="temp" scope="request" value="<@ARG ContactState>">'>
<@CHOICELIST NAME="ContactState" TYPE="select" OPTIONS="@@user$statelist[*,BaseOneItem]"
VALUES="@@user$statelist[*,BaseOneId]" SELECTED="@@request$temp">
TRUE='<@assign name="temp" scope="request" value="@@user$defaultstate[*,BaseOneId]">'
FALSE='<@assign name="temp" scope="request" value="<@ARG ContactState>">'>
<@CHOICELIST NAME="ContactState" TYPE="select" OPTIONS="@@user$statelist[*,BaseOneItem]"
VALUES="@@user$statelist[*,BaseOneId]" SELECTED="@@request$temp">
-----Original Message-----
From: John Newsom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 12:14 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: selected value in @choicelistI have a drop down list that stays on the top of a page with the search results below. When a search is done using the list, I want the selected item to remain selected in the list, instead of the list reverting back to the default. I can manually do it without using choicelist by having an if statement check the item id and add the word selected on true. Is there a way to dynamically use the selected attribute of @choicelist? I've tried @currow in the array element, but that doesnt seem to work.Here is my code for choicelist:<@CHOICELIST
NAME="projects" TYPE=SELECT OPTIONS="@@request$projects[*,2]" VALUES="@@request$projects[*,1]" SIZE=1 SELECTED="@@request$projects[<@currow>,2]">Here is my manual code for the other drop down list:
<SELECT
NAME="student" SIZE="1">
<@ROWS array="usstudents">
<OPTION VALUE="@@request$usstudents[<@currow>,1]"
<@IF EXPR="@@request$usstudents[<@currow>,1]=<@arg student>">selected</@IF>>@@request$usstudents[<@currow>,2] @@request$usstudents[<@currow>,3] @@request$usstudents[<@currow>,4]</OPTION>
</@ROWS>
</SELECT>
Thanks,
John
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
