|
John, If your choicelist
tag is not within a rows loop or a for loop, then <@currow>
will be empty and @@request$projects[<@currow>,2] will be null. Try using @@request$projects[1,2] instead. Or maybe <@arg projectID>
if you have that. A useful debugging technique is to break
the choicelist tag (ie <@ choicelist
…>) so you can see what goes into the options, values and selected
attributes of the tag in your results html. Dave Shelley -----Original
Message----- I 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"> </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 |
Title: Message
- Witango-Talk: selected value in @choicelist John Newsom
- Re: Witango-Talk: selected value in @choicelist Alan Wolfe
- RE: Witango-Talk: selected value in @choicelist Dave Shelley
- RE: Witango-Talk: selected value in @choicelist Wilcox, Jamileh (HSC)
